Add description for list templates feature.
diff --git a/ListsProtocol.wiki b/ListsProtocol.wiki
index 0981c45..f94f44c 100644
--- a/ListsProtocol.wiki
+++ b/ListsProtocol.wiki
@@ -11,6 +11,9 @@
{{{
{
"configuration" : {},
+ "templates": {
+ "<column>": "<template>"
+ },
"operations" : {
"buttons": [
{
@@ -47,11 +50,12 @@
This is a step by step description of the protocol.
-The very general format is a JSON object with three different objects, indexed by keys, with the following format:
+The very general format is a JSON object with four different objects, indexed by keys, with the following format:
{{{
{
"configuration" : {},
+ "templates": {},
"operations": {},
"data": {}
}
@@ -92,6 +96,20 @@
* *toolbar*: is an *array of a boolean and a string*. This should be present as displayed in the example if there are buttons to be displayed on top of the list (for example to show add/edit/delete options, see _data/operations/buttons_ details and _operations/buttons_ details.
----
+== *templates* ==
+The _templates_ object is used to define which columns between the ones defined in *colModel* will be substituted with a string that is built from a template. At the moment, it supports only Django-like variables like "{{ variable }}". Each variable *must* be a valid column name in *colModel*. If you have three columns with the following data _longDescription = ""_, _title = "My Title"_ and _name = "My Name"_ and use the following _templates_ object:
+
+{{{
+"templates": {
+ "longDescription": "My name is {{ name }} and my title is {{ title }}"
+}
+}}}
+
+then, in the final table, the _longDescription_ cell for that particolar row will display:
+
+_My name is My Name and my title is My Title_
+
+----
== *operations* ==
The _operations_ object is used in the protocol to define general behaviour of the list for buttons and rows actions. That is, you can define a number of buttons that will appear on top of the list, e.g. for add/edit/delete links (only consistent if you define {{{toolbar: [true, "top"]}}} in the _configurations_ object), and a default behaviour when a user clicks on a row of the list. Here an example explained: