Introductory Remarks | |
The structure for the steps is as following:
With the plugin {LIST()} you can do the same as you can do with plugin {trackerlist}.
Advantages of {LIST()} over {trackerlist}:
|
What you need to know first | |
note On an average shared hosting you can work with "Unified Search" and the option "MySQL Full-text Search as search engine". "Lucene" is possible as well, but not recommended and likely at some day not supported anymore, whilst "Elasticsearch" requires an "Elasticsearch" installation on a dedicated root server.
This said, we conclude, that plugin {LIST()} uses a "filter command" to filter arbitrary data from the database and some kind of "output command" to display the filtered data. "Format commands" optionally extend the output commands.
|
Task: How to filter and display data from a certain tracker? | |
|
0. basic syntax | |
Please mind, that the sort order of the parameters inside the commands is indifferent (meaning the order is not important). Same as with wiki plugin parameters it has no effect which parameter you write first. But it makes sense to stick to some general order (like a best practice) to make larger LIST plugins better readable by default, which might only perhaps make sense for you alone, but truly makes sense in a team based work environment. Copy to clipboard
|
1. LIST alone | |
Copy to clipboard
By only creating the empty List plugin, we already triggered a search query (actually an unspecified search query, searching for simply everything without any output directive).
Result:
We do not display the result here, to not waste too much space with a long list of unusable results. |
2. filtering the data from one tracker | |
info In the inline command "filter" you usually want to specify the type of object you are filtering (where filtering is limiting the search result to a subset of all database content). As explained above, an empty List plugin would just search for all content that is indexed in Unified Search. As LIST is build upon Unified Search you use Unified Search Fields to specify the filtered objects.
Copy to clipboard
Here we filter for a tracker Id, so we have the parameter field with the value tracker_Id.
Next, the filter command needs some specification which tracker Id we are looking for. There fore we use the parameter 'content with the value 7 . {filter field="tracker_id" content="7"} filters for all data that matches with the search for tracker_Id=7, where it does not look for the tracker itself, but for the content of this tracker (we will understand this very point later, just take it as given for now). Result:
This result as well has no value for us, but at least we already have broken the issue down to the tracker data we are looking for instead of filtering simply all existing data in the database. We do not display the result here, to not waste too much space with a long list of unusable results. |
3.1 using the table template instead of the default simple list | |
Copy to clipboard
At the time of writing this page, the pagination offers 3 pages. As today this Tiki is configured to a standard pagination of 50 items and the tracker Id=7 contains the current features of Tiki 15, we can assume that we have about more than 100 and less than 151 features in Tiki.
Easy to answer:
|
3.2 limiting the number of (to be) displayed results with the pagination command | |
Copy to clipboard
Result:
|
4. defining columns and display tracker items | ||||||||||||
Please keep in mind:
Copy to clipboard
Result:
|
5. the parameter "content" | |
Reminder:
Example:
Copy to clipboard
Result: |
6. getting tablesorter into the game | ||||||||||||
Do not forget ... ... to activate tablesorter when using for the first time on a site, cause otherwise it might happen, that it won't work. Please make sure, that you activate the preference jQuery Sortable Tables (We might add a comment to the preference on day to mention that "jQuery Sortable Tables" about equals "tablesorter". Sorry for the confusion.). You find the preference in /tiki-admin.php?page=features#contentadmin_features-interface. tablesorter will only work in plugin List from Tiki 15 onwards
tip For now you can find the tablesorter parameters here at the trackerlist wiki page - the options and parameters are identical with both, the LIST and the trackerlist plugin:
Copy to clipboard
Result:
Alias
|