PluginList format control block


The FORMAT control block is used to create individually formatted objects that can then be used in any of the individual OUTPUT methods.

Available filters

Name Description Boolean Sample Tiki Version
default Display a default value or a default file when no value is available no "empty", "1140" (fileId) -
format format the displayed value to something different that the db value (human readable) no "trackerrender", "date", "objectlink", etc. (see format parameters here) -
editable Make the field editable so the value can be changed from the results display. Inline editing (found in admin control panels => trackers) must be enable. Must be used in conjunction with the trackerrender format (see above) and may require mode="raw" when using it with the table output template} editable="inline" -
The jQuery Sortable Tables feature must be activated for the sort feature to work.


Note that in some cases the field that will be displayed has its own behavior and it can clash with the format you selected.
IE: A tracker field that is a "title" is pre-formatted as a link. If you set the format as "objectlink" (or you set the display inside a link) the display will end broken as Tiki will try to display a link inside a link.

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:

Sample using the default table formatting
Copy to clipboard
{LIST()} {filter type="trackeritem"} {filter content="water"} {OUTPUT(template="table")} {column field="title_link" sort="title" label="Title" mode="raw"} {column field="description" label="Description"} {column field="event_date" sort="tracker_field_18" label="Event Date"} {OUTPUT} {FORMAT(name="title_link")}{display name="title" format="objectlink"}{FORMAT} {FORMAT(name="event_date")}{display name="tracker_field_18" format="date"}{FORMAT} {LIST}


The first FORMAT control block defines an object with the name title_link that is displayed in a specific way - this object reference is then used in the column control block in the body of the table OUTPUT. Similarly the second FORMAT control block defines the event_date object which is also used in a column control block.

A similar use of the FORMAT control block allows the normal set of Smarty variables, eg {user} etc, to be made available in Smarty templates - for example:

Format example to reference a normal smarty variable
Copy to clipboard
{FORMAT(name="theuser")} { {user} } {FORMAT}
 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 theuser with the userId of the current user which can then be invoked in a server stored smarty template using the variable {$row.theuser}.

Examples of the use of the FORMAT control block (format and default value)

Copy to clipboard
{LIST()} {filter field="tracker_id" content="1"} {filter field="tracker_status" content="o"} {OUTPUT()} {DIV(class="h3")}{display name="name"}{DIV} {display name="photo"}%%% {display name="email"} {OUTPUT} {FORMAT(name="name")}{display name="tracker_field_userName"}{FORMAT} {FORMAT(name="photo")}{display name="tracker_field_userPhoto" format="trackerrender" default="1140"}{FORMAT} {FORMAT(name="location")}{display name="tracker_field_userLocation" format="trackerrender" default="Unknown"}{FORMAT} {LIST}


Default parameter applied on the "photo" field will display a default generic image if not file found.
Default parameter applied on the "location" field will display the text "Unknown" if the field is empty.

Example with comments


You might want to display all comments, and this script will retrieve them:

Wiki Output Sample
Copy to clipboard
{LIST(cache="n")} {filter type="comment"} {pagination max="10"} {OUTPUT( template="table")} {column field="title"} {column field="comment_content"} {column field="object_link" mode="raw"} {column field="date"} {OUTPUT} {FORMAT( name="object_link")} {display name="object_id" format="objectlink"} {FORMAT} {sort mode="date_desc"} {LIST}

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.
This gives us the following result:

Title Comment Thread Id Date
Re: documentation for editor problems > I've not been able to find any documentation to explain what to do when the editor page doesn't look as described/shown on this page. After installing three times, I can't get the quicklinks to show when 'edit' page button is clicked. I don't know if this is a configuration problem or an installation problem or just a bug. Can anyone help? I'm quite new to Wiki but the Editor looks a bit different for me as well, even if most problems were eliminated by allowing the items in the Feature list and allow to use them by the appropriate groups. 436 2007-07-05 13:05:15
Re: wysiwyg > I've installed 1.9.7 too and i followed the instructions posted here: > http://tikiwiki.org/tiki-index.php?page=wysiwyg > > Either way i can't enable it in the wiki admin page. No idea myself, Gelo. I never tried using wysiwyg in 1.9.x (it's very limited and not compatible with wiki markup in some other pages of the same Tiki site). In 1.10 it seems to be much better... (I'd suggest you to wait for 1.10.0 to be released...., whenever this happens - no idea when) Cheers 423 2007-06-11 17:54:00
wysiwyg I've installed 1.9.7 too and i followed the instructions posted here: http://tikiwiki.org/tiki-index.php?page=wysiwyg Either way i can't enable it in the wiki admin page. 422 2007-06-10 15:26:06
documentation for editor problems I've not been able to find any documentation to explain what to do when the editor page doesn't look as described/shown on this page. After installing three times, I can't get the quicklinks to show when 'edit' page button is clicked. I don't know if this is a configuration problem or an installation problem or just a bug. Can anyone help? 415 2007-06-08 07:41:48
Debug 1.9, 1.10 If you have problem setting webmail - in reception You can change in lib/webmail/net_pop3.php 115c115 < var $_debug = false; --- > var $_debug = true; 401 2007-06-05 17:24:00
Re: Own dogfood Yes! I added rating to dev.tikiwiki.org and we can add here too soon... 400 2007-06-04 00:57:49
Disable tiki-install.php? Is there no option to disable tiki-install.php after the upgrade? "Click here to disable the install script and proceed into tiki" 397 2007-06-02 00:13:47
Re: Re: Temporarily Locked for security until fivos learns how to create greek pages a part, and lin > Thanks for doing this,I just found the way to do the translation proper.I have question, how I can add structure in my pages so I can move back and front in the pages without changing language > Hi fivos, you are welcome ๐Ÿ˜Š Below you have a dump of the documentation structure. Please: # copy the content of this box (below) to your favorite text editor # add the ",el" ending to all the pages, # write back the modified structure dump to a comment to this page (or to author coffeeshop forum, if you prefer), within a CODE box, for instance. {CODE()} Introduction,el Goals,el Installation,el Requirements and Setup,el Download,el (... all your modified structure here) {CODE} and I'll set the structure for you. Copy to clipboard Introduction Goals Installation Requirements and Setup Download Linux Install with RPM Install from Source Install on Debian Install on Gentoo Windows Desktop Install Advanced Settings Shared Hosting Lite install MultiTiki Rewrite Rules ImageMagick Install GraphViz Install TroubleShooting Upgrade Upgrade 1.8 to 1.9 Upgrade 1.9.x to 1.9.7 Upgrade 1.9.7 to 1.10 Mods Mods User Mods Admin Mods Details Configuration Quick Start Using profiles Advanced Configuration Site Identity Module Controls Features Wiki Using Wiki Pages Wiki-Syntax Links Wiki-Syntax Lists Wiki-Syntax Images Wiki-Syntax Text Wiki-Syntax Special Characters Wiki Config Wiki Details Wiki Plugins PluginModule PluginCode PluginSkype PluginAgentinfo PluginManager PluginSkype PluginTracker PluginTrackerFilter PluginTrackerList PluginTrackerStat PluginTrackerItemField PluginVote PluginMiniQuiz PluginLang PluginTranslated PluginVersions PluginDiv PluginFiles PluginArticles PluginGroup PluginPerm PluginSplit PluginGroup PluginFlash PluginGoogleVideo PluginWMV PluginYouTube PluginRedirect PluginMindmap PluginJS PluginThumb PluginMouseover PluginRSS Wysiwyg Editor Wysiwyg Editor User Wysiwyg Editor Details Image Galleries Image Galleries User Image Galleries Config Image Galleries Details Articles Articles User Articles Config Articles Details Blogs Blogs User Blogs Config Blogs Ref File Galleries File Galleries User File Galleries Config File Galleries Details Forums Forums User Forums Admin Forums Details Directory Directory User Directory Admin Directory Details FAQs FAQs User FAQs Admin FAQs Details Quizzes Quizzes User Quizzes Admin Quizzes Details Trackers Trackers User Trackers Admin Trackers Details Creating a Tracker Adding fields to a tracker Tracker Field Type User / Group / IP Selector Tracker Field Image Tracker Field Drop Down Tracker Field Items List and Item Link Tracker Fields Category Tracker Field Subscription Tracker Field Dynamic items list Spreadsheet Basic Functionality Edit Interface Graphics and Charts Surveys Surveys User Surveys Admin Surveys Details Newsletters Newsletters User Newsletters Admin Newsletters Details Ephemerides Ephemerides User Ephemerides Admin Ephemerides Details Charts Charts User Charts Admin Charts Details Stats Stats User Stats Admin Stats Details Games Games User Games Admin Games Details Calendar Calendar User Calendar Admin Calendar Details Workflow Workflow User Workflow Admin Workflow Details Integrator Integrator User Integrator Admin Integrator Details Categories Categories User Categories Admin Categories Details Banners Banners User Banners Admin Banners Details Modules Modules User Modules Admin Modules Details Chat Chat User Chat Admin Chat Details Live Support Live Support User Live Support Admin Live Support Details Maps Maps User Maps Editor Maps Layer Management Maps Mapfiles Manager Maps Details Maps Mapfile Tutorial Maps MapView Maps Admin Maps Install Maps Config Gmap Tikibot Tikibot User Tikibot Admin Tikibot Details Mobile Tiki Mobile Tiki User Mobile Tiki Admin Mobile Tiki Details Structures Structures User Structures Admin Structures Details Slideshow Slideshow User Slideshow Admin Slideshow Details Comments Comments User Comments Admin Comments Details Contribution Copyright Management Copyright Management User Copyright Management Admin Copyright Management Details Communications Center Communications Center User Communications Center Admin Communications Center Details Spellchecking Spellchecking User Spellchecking Admin Spellchecking Details Redirect On Error Redirect On Error User Redirect On Error Admin Redirect On Error Details Drawings Drawings User Drawings Admin Drawings Details HTML Pages HTML Pages User HTML Pages Admin HTML Pages Details Dynamic Content Dynamic Content User Dynamic Content Admin Dynamic Content Details Dynamic Variable Polls Polls User Polls Admin Polls Details RSS Feeds RSS Feeds User RSS Admin RSS Feeds Details Shoutbox Shoutbox User Shoutbox Admin Shoutbox Details Search Search User Search Admin Search Details MyTiki MyTiki Admin MyTiki Details Webmail Inter-User Messages User Notepad User Tasks User Files User Calendar User Menus User Preferences User Bookmarks User Modules User Watches Newsreader User Action log Tell a Friend Admin Panels Features Admin General Admin Login Config Login Authentication Methods Users Management Groups Management Permissions Settings Admin DSN Backups Banning Cache Content Templates Cookies Edit Templates External Wikis Featured Links Mail notifications Mail-in Maps Config Custom Menus Theme Control Phpinfo Admin Details Action Log Intertiki Contribution Wysiwyg Editor Admin Internationalization Internationalization Admin Tuning Tikiwiki Design Styles and Themes Design rules Smarty Templates Hacking Tikiwiki Integrating another Application Adding a new feature Using Smarty Filters Translating to a new language ToolBox Linux tools Windows tools wBloggar Java Tools Eclipse Annexes About the Tikiwiki Documentation Welcome Authors Tikiwiki Manual of Style Documentation Templates Feature Page Template Documentation Status Third Party code Smarty Adodb SmartIrc Wollabot Mapserver SpellChecker History Changelog 1.9 Changelog 1.8 Changelog 1.7 Changelog 1.6 Changelog 1.5 Changelog 1.4 Changelog 1.3 Changelog 1.2 Changelog 1.1 Changelog 1.0 Copyrights Tikiwiki Community 392 2007-06-01 08:34:27
Re: Temporarily Locked for security until fivos learns how to create greek pages a part, and link tr Thanks for doing this,I just found the way to do the translation proper.I have question, how I can add structure in my pages so I can move back and front in the pages without changing language 389 2007-06-01 07:52:43
Temporarily Locked for security until fivos learns how to create greek pages a part, and link transl Hi, fivos, I've locked also this page, since you are still confusing a bit where to edit. I've seen that you have already started the http://doc.tikiwiki.org/Wiki,el page, but you kept editing the english one as if it was the greekone. I've restored the last correct english page, re-set language to English, and locked (anybody ask a person from the Editorial board to unlock, when everything seems to be fine again. Thanks for understanding, and improving Tikiwiki documentation in your own language! ๐Ÿ˜Š. 386 2007-06-01 07:10:40


We see that this only gives us the information about the object (the comment in this case), but what if I want to have more information before visiting the comment?

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:

Wiki Output Sample
Copy to clipboard
{LIST(cache="n")} {filter type="comment"} {pagination max="10"} {OUTPUT( template="table")} {column field="contributors"} {column field="title"} {column field="comment_content"} {column field="parent_object_title" mode="raw"} {column field="object_link" mode="raw"} {column field="date"} {OUTPUT} {FORMAT( name="object_link")} {display name="object_id" format="objectlink"} {FORMAT} {FORMAT( name="parent_object_title")} {display name="parent_object_type"}: {display name="wikiplugin_objectlink" format="wikiplugin" type="parent_object_type" id="parent_object_id"} {FORMAT} {sort mode="date_desc"} {LIST}

Here we have just added a new column whose label is "Parent Object".
The new FORMAT control block formats the parent_object_title field, which is the title of the comment's parent object, then with {display} tag we first display the name of the parent object, which is stored in the parent_object_type field. For example, if the parent object is a trackeritem, it will display "trackeritem:", and finally we display the link to the parent object, using the wikiplugin_objectlink plugin. This plugin allows you to create a link to a Tiki object according to its type and its identifier. Here you specify the link format as "wikiplugin", the object type as parent_object_type, and the object id as parent_object_id. For example, if the parent object is a trackeritem with id 1, this will generate a link to "tiki-view_tracker_item.php?itemId=1".
So you get a field that displays the name and link of the comment's parent object. For example, if the comment is linked to an item called "This is my first item", you display "trackeritem: This is my first item".
This gives us the following result:

Title Comment Parent Object Thread Id Date
Re: documentation for editor problems > I've not been able to find any documentation to explain what to do when the editor page doesn't look as described/shown on this page. After installing three times, I can't get the quicklinks to show when 'edit' page button is clicked. I don't know if this is a configuration problem or an installation problem or just a bug. Can anyone help? I'm quite new to Wiki but the Editor looks a bit different for me as well, even if most problems were eliminated by allowing the items in the Feature list and allow to use them by the appropriate groups. wiki page: Wiki Page Editor 436 2007-07-05 13:05:15
Re: wysiwyg > I've installed 1.9.7 too and i followed the instructions posted here: > http://tikiwiki.org/tiki-index.php?page=wysiwyg > > Either way i can't enable it in the wiki admin page. No idea myself, Gelo. I never tried using wysiwyg in 1.9.x (it's very limited and not compatible with wiki markup in some other pages of the same Tiki site). In 1.10 it seems to be much better... (I'd suggest you to wait for 1.10.0 to be released...., whenever this happens - no idea when) Cheers wiki page: WYSIWYG 423 2007-06-11 17:54:00
wysiwyg I've installed 1.9.7 too and i followed the instructions posted here: http://tikiwiki.org/tiki-index.php?page=wysiwyg Either way i can't enable it in the wiki admin page. wiki page: WYSIWYG 422 2007-06-10 15:26:06
documentation for editor problems I've not been able to find any documentation to explain what to do when the editor page doesn't look as described/shown on this page. After installing three times, I can't get the quicklinks to show when 'edit' page button is clicked. I don't know if this is a configuration problem or an installation problem or just a bug. Can anyone help? wiki page: Wiki Page Editor 415 2007-06-08 07:41:48
Debug 1.9, 1.10 If you have problem setting webmail - in reception You can change in lib/webmail/net_pop3.php 115c115 < var $_debug = false; --- > var $_debug = true; wiki page: Webmail 401 2007-06-05 17:24:00
Re: Own dogfood Yes! I added rating to dev.tikiwiki.org and we can add here too soon... wiki page: Features 400 2007-06-04 00:57:49
Disable tiki-install.php? Is there no option to disable tiki-install.php after the upgrade? "Click here to disable the install script and proceed into tiki" wiki page: Upgrade 1.9.x to 1.9.7 397 2007-06-02 00:13:47
Re: Re: Temporarily Locked for security until fivos learns how to create greek pages a part, and lin > Thanks for doing this,I just found the way to do the translation proper.I have question, how I can add structure in my pages so I can move back and front in the pages without changing language > Hi fivos, you are welcome ๐Ÿ˜Š Below you have a dump of the documentation structure. Please: # copy the content of this box (below) to your favorite text editor # add the ",el" ending to all the pages, # write back the modified structure dump to a comment to this page (or to author coffeeshop forum, if you prefer), within a CODE box, for instance. {CODE()} Introduction,el Goals,el Installation,el Requirements and Setup,el Download,el (... all your modified structure here) {CODE} and I'll set the structure for you. Copy to clipboard Introduction Goals Installation Requirements and Setup Download Linux Install with RPM Install from Source Install on Debian Install on Gentoo Windows Desktop Install Advanced Settings Shared Hosting Lite install MultiTiki Rewrite Rules ImageMagick Install GraphViz Install TroubleShooting Upgrade Upgrade 1.8 to 1.9 Upgrade 1.9.x to 1.9.7 Upgrade 1.9.7 to 1.10 Mods Mods User Mods Admin Mods Details Configuration Quick Start Using profiles Advanced Configuration Site Identity Module Controls Features Wiki Using Wiki Pages Wiki-Syntax Links Wiki-Syntax Lists Wiki-Syntax Images Wiki-Syntax Text Wiki-Syntax Special Characters Wiki Config Wiki Details Wiki Plugins PluginModule PluginCode PluginSkype PluginAgentinfo PluginManager PluginSkype PluginTracker PluginTrackerFilter PluginTrackerList PluginTrackerStat PluginTrackerItemField PluginVote PluginMiniQuiz PluginLang PluginTranslated PluginVersions PluginDiv PluginFiles PluginArticles PluginGroup PluginPerm PluginSplit PluginGroup PluginFlash PluginGoogleVideo PluginWMV PluginYouTube PluginRedirect PluginMindmap PluginJS PluginThumb PluginMouseover PluginRSS Wysiwyg Editor Wysiwyg Editor User Wysiwyg Editor Details Image Galleries Image Galleries User Image Galleries Config Image Galleries Details Articles Articles User Articles Config Articles Details Blogs Blogs User Blogs Config Blogs Ref File Galleries File Galleries User File Galleries Config File Galleries Details Forums Forums User Forums Admin Forums Details Directory Directory User Directory Admin Directory Details FAQs FAQs User FAQs Admin FAQs Details Quizzes Quizzes User Quizzes Admin Quizzes Details Trackers Trackers User Trackers Admin Trackers Details Creating a Tracker Adding fields to a tracker Tracker Field Type User / Group / IP Selector Tracker Field Image Tracker Field Drop Down Tracker Field Items List and Item Link Tracker Fields Category Tracker Field Subscription Tracker Field Dynamic items list Spreadsheet Basic Functionality Edit Interface Graphics and Charts Surveys Surveys User Surveys Admin Surveys Details Newsletters Newsletters User Newsletters Admin Newsletters Details Ephemerides Ephemerides User Ephemerides Admin Ephemerides Details Charts Charts User Charts Admin Charts Details Stats Stats User Stats Admin Stats Details Games Games User Games Admin Games Details Calendar Calendar User Calendar Admin Calendar Details Workflow Workflow User Workflow Admin Workflow Details Integrator Integrator User Integrator Admin Integrator Details Categories Categories User Categories Admin Categories Details Banners Banners User Banners Admin Banners Details Modules Modules User Modules Admin Modules Details Chat Chat User Chat Admin Chat Details Live Support Live Support User Live Support Admin Live Support Details Maps Maps User Maps Editor Maps Layer Management Maps Mapfiles Manager Maps Details Maps Mapfile Tutorial Maps MapView Maps Admin Maps Install Maps Config Gmap Tikibot Tikibot User Tikibot Admin Tikibot Details Mobile Tiki Mobile Tiki User Mobile Tiki Admin Mobile Tiki Details Structures Structures User Structures Admin Structures Details Slideshow Slideshow User Slideshow Admin Slideshow Details Comments Comments User Comments Admin Comments Details Contribution Copyright Management Copyright Management User Copyright Management Admin Copyright Management Details Communications Center Communications Center User Communications Center Admin Communications Center Details Spellchecking Spellchecking User Spellchecking Admin Spellchecking Details Redirect On Error Redirect On Error User Redirect On Error Admin Redirect On Error Details Drawings Drawings User Drawings Admin Drawings Details HTML Pages HTML Pages User HTML Pages Admin HTML Pages Details Dynamic Content Dynamic Content User Dynamic Content Admin Dynamic Content Details Dynamic Variable Polls Polls User Polls Admin Polls Details RSS Feeds RSS Feeds User RSS Admin RSS Feeds Details Shoutbox Shoutbox User Shoutbox Admin Shoutbox Details Search Search User Search Admin Search Details MyTiki MyTiki Admin MyTiki Details Webmail Inter-User Messages User Notepad User Tasks User Files User Calendar User Menus User Preferences User Bookmarks User Modules User Watches Newsreader User Action log Tell a Friend Admin Panels Features Admin General Admin Login Config Login Authentication Methods Users Management Groups Management Permissions Settings Admin DSN Backups Banning Cache Content Templates Cookies Edit Templates External Wikis Featured Links Mail notifications Mail-in Maps Config Custom Menus Theme Control Phpinfo Admin Details Action Log Intertiki Contribution Wysiwyg Editor Admin Internationalization Internationalization Admin Tuning Tikiwiki Design Styles and Themes Design rules Smarty Templates Hacking Tikiwiki Integrating another Application Adding a new feature Using Smarty Filters Translating to a new language ToolBox Linux tools Windows tools wBloggar Java Tools Eclipse Annexes About the Tikiwiki Documentation Welcome Authors Tikiwiki Manual of Style Documentation Templates Feature Page Template Documentation Status Third Party code Smarty Adodb SmartIrc Wollabot Mapserver SpellChecker History Changelog 1.9 Changelog 1.8 Changelog 1.7 Changelog 1.6 Changelog 1.5 Changelog 1.4 Changelog 1.3 Changelog 1.2 Changelog 1.1 Changelog 1.0 Copyrights Tikiwiki Community wiki page: Wiki 392 2007-06-01 08:34:27
Re: Temporarily Locked for security until fivos learns how to create greek pages a part, and link tr Thanks for doing this,I just found the way to do the translation proper.I have question, how I can add structure in my pages so I can move back and front in the pages without changing language wiki page: Wiki 389 2007-06-01 07:52:43
Temporarily Locked for security until fivos learns how to create greek pages a part, and link transl Hi, fivos, I've locked also this page, since you are still confusing a bit where to edit. I've seen that you have already started the http://doc.tikiwiki.org/Wiki,el page, but you kept editing the english one as if it was the greekone. I've restored the last correct english page, re-set language to English, and locked (anybody ask a person from the Editorial board to unlock, when everything seems to be fine again. Thanks for understanding, and improving Tikiwiki documentation in your own language! ๐Ÿ˜Š. wiki page: Wiki 386 2007-06-01 07:10:40

Using Font Awesome icons instead of content depending on the value of the field content


Tweaking the sample above and using font awesome (integrated in Tiki) you can display corresponding icons for a content.
In this demo case we have a tracker with a "gender" field that hold 2 values, "male" or "female". There is a "male" and a "female" icon in Font Awesome and as both use the same term we can assign it to a div type icon and class.

Copy to clipboard
{LIST()} {filter field="tracker_id" content="42"} {OUTPUT(template="table")} {column label="Title" field="title" sort="title"} {column label="Gender" field="gender"} {OUTPUT} {FORMAT(name="gender")}{DIV(type=i class=fa fa-{display name="tracker_field_gender"})}{DIV}{FORMAT} {LIST}

Editable inline sample using the table template

Copy to clipboard
{column label="First Name" field="firstName" mode=raw} ... {FORMAT(name="firstName")}{display name="tracker_field_firstName" format=trackerrender editable=inline}{FORMAT}

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
{wikiplugin _name=list} {literal} {filter content="2" field="tracker_id"} {output(template="mytemplate.tpl")} {ALTERNATE()} empty {ALTERNATE} {FORMAT(name="name")}{display name="tracker_field_name" editable="inline" format="trackerrender" default=""}{FORMAT} {/literal} {/wikiplugin}


So the 2nd column uses a FORMAT plugin where the contents of the field in question, tracker_field_data, is used as the class for a div but the default (used if the data field is empty) is set to be the bootstrap class "hidden" so the contents, the check mark, only appears if there is some data.

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


Tweaking the sample above and using font awesome (integrated in Tiki) you can display corresponding icons for a content.
In this demo case we have a tracker with a "gender" field that hold 2 values, "male" or "female". There is a "male" and a "female" icon in Font Awesome and as both use the same term we can assign it to a div type icon and class.

Copy to clipboard
{LIST()} {filter field="tracker_id" content="42"} {OUTPUT(template="table")} {column label="Title" field="title" sort="title"} {column label="Gender" field="gender"} {OUTPUT} {FORMAT(name="gender")}{DIV(type=i class=fa fa-{display name="tracker_field_gender"})}{DIV}{FORMAT} {LIST}

It will display a
if the content of the field = male and a
if the content of the field = female.


When you use a template to display your plugin list you want other item related or linked to the item to open using the same template (or another it doesn't matter) but not to open the trackers built-in system. For this you need to enable the Alias feature and set it to use the template to display the tracker item, "record-" for this sample.

When you use an item link to link an item to other item (related, friend of, etc.) this is a kind of a problem.
Item link has 2 option to display and item link. Value and Link.
Value display the id of the content (ie: 6).
Link display the value of the content linked to the tracker item (ie: Bernard).

Your link should be like:

Copy to clipboard
[record-6|Bernard]

So it open the item "Id6" in the "record-" template showing the value "Bernard" for the link.
To achieve this you need to create and use 2 row.

Copy to clipboard
{FORMAT(name="name")}{display name="tracker_field_contact" format=trackerrender}{FORMAT} {FORMAT(name="id")}{display name="tracker_field_contact"}{FORMAT}


The first one with format=trackerrender will display the content of the tracker Item Link field as it is shown in the tracker (Bernard).
The second one without the format=trackerrender will show the real value for this field (6).

The assemble your link as follow:

Copy to clipboard
[record-{display name="id"}|{display name="name"}]

It will complete the trick and open the item 6 using the record- template while the link displayed will show the right value, Bernard.

All the LIST Plugin control blocks