PluginList format control block | |
|
Available filters | ||||||||||||||||||||
For the default parameter, it's important to remember that the tracker field "Files" works a bit differently than the others with this parameter. The tracker field Files expect an Id from the File Gallery. When most of the other fields type will display the text of the default parameters the default for "Files" must be an existing file in a gallery. The file can be an "anonymous" portrait file or a plain white image or an image with only the text "Not Available", etc. Whatever you feel right for your usage. |
Basic example | |
In most of the examples shown in PluginList output control block and PluginList advanced output control block you will see a FORMAT control block have been used. E.g. in the example shown for Table output as below, two FORMAT control blocks are used: Copy to clipboard
A similar use of the FORMAT control block allows the normal set of Smarty variables, eg Copy to clipboard
Note The double brackets ( {{}} ) around user should have no spaces between them. Spaces are used here only to keep the user variable from being interpreted. This creates a reference object |
Examples of the use of the FORMAT control block (format and default value) | |
Copy to clipboard
|
Example with comments | ||||||||||||||||||||||||||||||||||||
Copy to clipboard
The FORMAT control block defines an object with the name object_link which is displayed in such a way that it is object_id which is displayed and formatted as objectlink; which makes the id clickable. This object reference is then used in the column control block in the body of the OUTPUT table.
One way to do this is to add a column which indicates the item being commented on. It is typically a wiki page or tracker item which is clickable and takes me there. So let's make some changes and see what we have: Copy to clipboard
Here we have just added a new column whose label is "Parent Object".
|
Using Font Awesome icons instead of content depending on the value of the field content | |
Copy to clipboard
|
Editable inline sample using the table template | |
Copy to clipboard
|
Editable inline sample in a smarty (or wiki) template | |
In this wikiplugin embedded in a smarty (or wiki) template the field is set to be editable inline (note: format="trackerrender" is required ad well as the Inline editing (found in admin control panels=>trackers) Copy to clipboard
Obviously if the data is the name of some other class weird stuff might happen, but for most usual cases, it works as expected and saves having to make a new smarty template just for this simple list. (Tip and example taken from a message from JonnyB in the developers list - thanks!) |
Using Font Awesome icons instead of content depending on the value of the field content | |
Copy to clipboard
It will display a if the content of the field = male and a if the content of the field = female.
|
Display an Item Link (tracker item) linked to another item within a template page | |
When you use an item link to link an item to other item (related, friend of, etc.) this is a kind of a problem.
Your link should be like: Copy to clipboard
So it open the item "Id6" in the "record-" template showing the value "Bernard" for the link.
Copy to clipboard
The assemble your link as follow: Copy to clipboard
It will complete the trick and open the item 6 using the record- template while the link displayed will show the right value, Bernard. |
Using smarty to format variables (from Tiki 26+) | |
Instead of using wiki format, you can specify template or tplwiki arguments to refer to a smarty template stored in a file or a wiki page. See PluginList-output-control-block#Parameters for more info on accepted values. All the LIST Plugin control blocks |