Loading...
 

 Login Disabled

On 2017-04-04 we had a rather major disk malfunction that caused data loss. The data on this site is from 2016-11-05. We are still investigating possibilities to get newer backups, but please prepare for the worst. In the meanwhile InterTiki login (for editing) is temporarily disabled on this site.

LIST - format command


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



Basic example

In most of the examples shown in LIST - OUTPUT command and LIST - advanced output command you will see a FORMAT command will have been used. e.g. in the example shown for Table output as below, two FORMAT commands are used:

Sample using the default table formatting
{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 command defines an object with the name title-link that is displayed in a specific way - this object reference in then used in the column command in the body of the table OUTPUT. Similarly the second FORMAT command defines the event_date object which is also used in a column command.

A similar use of the FORMAT command 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
{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}

Table with check marks instead of content when values found

In case you wanted a table with check marks (ticks) for if certain fields were filled in, rather than showing the actual data showing, you can use this code:
{LIST()}
  {filter field="tracker_id" content="42"}
  {OUTPUT(template="table")}
    {column label="Title" field="title" sort="title"}
    {column label="Has Data" field="hasData"}
  {OUTPUT}
  {FORMAT(name="hasData")}{DIV(class={display name="tracker_field_data" default="hidden"} title="Has some data")}{icon name="check-circle"}{DIV}{FORMAT}
{LIST}

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!)


All the LIST Plugin commands


doc.tiki.org


Bootstrap

AdminGuide

UserGuide

Keywords

Keywords serve as "hubs" for navigation within the Tiki documentation. They correspond to development keywords (bug reports and feature requests):

Accessibility (WAI and 508)
Accounting (7.x)
Articles and Submissions
Backlinks
Banners
Batch (6.x)
BigBlueButton audio/video/chat/screensharing (5.x)
Blog
Bookmark
Browser Compatibility
Link Cache
Calendar
Category
Chat
Clean URLs
Comments
Communication Center
Compression (gzip)
Contacts (Address Book)
Contact us
Content Templates
Contribution (2.x)
Cookie
Copyright
Credit (6.x)
Custom Home and Group Home Page
Date and Time
Debugger Console
Directory of hyperlinks
Documentation link from Tiki to doc.tiki.org (Help System)
Docs 8.x
Draw 7.x
Dynamic Content
Dynamic Variable
External Authentication
FAQ
Featured links
File Gallery
Forum
Friendship Network (Community)
Gmap Google maps
Groups
Hotword
HTML Page
i18n (Multilingual, l10n, Babelfish)
Image Gallery
Import-Export
Install
Integrator
Interoperability
Inter-User Messages
InterTiki
Kaltura video management (4.x)
Karma
Live Support
Login
Logs (system & action)
Look and Feel
Lost edit protection
Mail-in
Map with Mapserver
Menu
Meta Tags
Mobile Tiki and Voice Tiki
Mods
Module
MultiTiki
MyTiki
Newsletter
Notepad
Payment
Performance Speed / Load
Permissions
Platform independence (Linux-Apache, Windows/IIS, Mac, BSD)
Polls
Profiles
Profile Manager
Report
Toolbar
Quiz
Rating
Feeds
Score
Search engine optimization
Search
Search and Replace
Security
Semantic links (3.x)
Shadowbox
Shadow Layers
Share
Shopping cart
Shoutbox
Slideshow
Smiley
Social Networks
Spam protection (Anti-bot CATPCHA)
Spellcheck
Spreadsheet
Stats
Surveys
Tags (2.x)
Task
Tell a Friend, alert + Social Bookmarking
TikiTests (2.x)
Theme CSS & Smarty
Trackers
Transitions (5.x)
TRIM
User Administration including registration and banning
User Files
User Menu
Watch
WebHelp
WebDAV (5.x)
Webmail
Web Services
Wiki 3D
Wiki History, page rename, etc
Wiki Page Staging and Approval (2.x)
Wiki Plugin extends basic syntax
Wiki Syntax
Wiki structure (book and table of content)
Workspace
WSOD
WYSIWYCA
WYSIWYG (2.x)
XMLRPC


Tiki Newsletter

Delivered fresh to your email inbox!
Newsletter subscribe icon
Don't miss major announcements and other news!
Contribute to Tiki