Loading...
 

LIST - display

The DISPLAY command (or block) is used when you want to display something in-place where you put it - either in the body of a FORMAT block or directly in the body of the OUTPUT block or in a referenced custom template (Smarty tpl file or a wiki page).

Syntax

DISPLAY block has two possible syntax options similar to Wiki-Plugin syntax.
For example you could use:
{DISPLAY(param="foo")}{DISPLAY}


But it seems the body of the DISPLAY block is never rendered anyway so it is obviously better to use the lowercase shortened version without the content part:
{display param="foo"}


The param="foo" can be e.g. format="plain".
It is possible to omit the double quotes but it is recommended to use them for consistency just in case a value contains spaces.

Parameters

  • name
    mandatory parameter where you put the name of the Indexed Field you want to display or an alias which refers to name of the FORMAT block.
  • default
    The DISPLAY ‘plugin’ can have an additional default parameter to specify the value to use if the object type does not contain the named value
    • use default=" " to show a blank value instead of No value for ... when there is no value
  • format
    The DISPLAY ‘plugin’ can have an additional format parameter to specify custom display methods
    • plain : as-is, default format (does not work with Arrays as is, you need to add the separator="" param below on them)
      • Optional separator attribute
    • date : using the short date format
    • datetime : using the short datetime format (Tiki8)
    • timeago : using the timeago.js formatting for more readable dates and times (Tiki16/15.3)
    • imagegrabber : automatically grabs images from a source that is provided. set format=”imagegrabber” to use.
      • Mandatory name attribute is the content for which you’re searching
      • Optional content_type attribute is either html when searching through html source, or forumpost (default for backwards compatibility) to search for images in a forum.
      • ‘’Example use:
        {FORMAT(name="images")}{display name=article_content format="imagegrabber" content_type="html" width="150" max="3" default="img/icons/synergiq-folder.png"}{FORMAT}
      • Return value for html is in the following format, assuming a return of 3 images:
        <img src='http://abc/imagea.jpg'>
        <img src='http://abc/imageb.jpg'>
        <img src='http://abc/imagec.jpg'>
    • objectlink : uses the value as the label to a link to the object
    • snippet : to display the initial portion of the a large text
      • Optional length attribute
      • Optional suffix attribute
    • reference : to display a link based on the value
      • Mandatory type attribute
      • Optional separator attribute
      • Use format=reference for tracker fields which are page selector fields, to assure that you link to the page whose name is contained in the tracker, rather than to the tracker record.
    • trackerrender : to render a tracker field (when using trackerrender the Smarty variable $context.search_render will be y and can be used to have different formatting in the trackeroutput Smarty tpl)
    • wikiplugin : Renders a wiki plugin in the list output
      • name : plugin name, e.g. wikiplugin_img
      • default : fallback values for any parameters in url query format (e.g. fileId=42&caption=Not+Found) (Tiki 11)
      • other plugin params (Tiki 11)
    • categorylist, to display category names instead of category id’s. By default, it will display categories in html unordered lists; but you can produce a plain text list of category names when you add the parameter: separator=”,”. (Tiki =>16.2)+-
    • number, to display formatted number using php number_format function. Accepts parameters: decimal=0 (number of decimal digits), dec_point=. (decimal point character), thousands_sep=, (thousands separator character). (Tiki =>17.0)+-
  • list_mode
    (Tiki 9+) list_mode="y" can be added to use the list display settings for that field. e.g. {display name="tracker_field_42" format="trackerrender" list_mode="y"}
  • pagetitle
    (Tiki 9+) pagetitle="y" will set the browser title to the contents of the field for the first item found in the results with page title set (useful for single item result pages)
  • pagedescription
    (Tiki 11+) pagedescription="y" will set the page’s meta description tag to the contents of the field for the first item found in the results with pagedescription set if the metatag_pagedesc preference is enabled.
    • Note: For both pagedescription and pagetitle no filtering is performed on the content, so use plain text only and avoid non-alphanumeric characters.
  • editable
    (Tiki 11+) editable=inline will set the field to be editable online. Required: “Inline editing (found in trackers)” and column should be set to mode=raw. e.g:
    {column label="First Name" field="firstName" mode=raw}
    {FORMAT(name="firstName")}{display name="tracker_field_firstName" format=trackerrender editable=inline}{FORMAT}
  • The FORMAT ‘plugin’ allows to apply a wiki template and store it inside a named value. The value can then be used inside an other wiki template, or more usefully inside a smarty template.

Examples

Display blog post with title (yes, you can use vanilla HTML code in the OUTPUT)
<h2>{display name="title" format="objectlink"}</h2>
{display name="blog_content"}

Display shortened blog post snippet
{display name="blog_content" format="snippet" length="96" suffix="…"}

Display category links
{display name="categories" format="reference" type="category"}

Display freetag links
{display name=freetags" format="reference" type="freetag"}

Display item link
{display name="tracker_field_42" format="trackerrender"}
{display name="tracker_field_42" format="reference" type="trackeritem"}

Display start of a wiki page
{display name="wiki_content" format="snippet" length="500 " suffix="..."}

Display a username and real name (e.g. for blog posts) with link to user info:
{display name="contributors" format="reference"}
{display name="contributors" format="reference" type="user"}

Display field in FORMAT block referenced via alias "foo"
{display name="foo"}

(Please note FORMAT must be always outside of the OUTPUT)
{OUTPUT()}Preview of the Foo: {display name="foo"}{OUTPUT}
{FORMAT(name="foo")}{display name="wiki_content" format="snippet" length="500 " suffix="..."}{FORMAT}

(Tiki 8) Categories
(n.b. does not seem to work on the mysql engine, checked in Tiki 12 and 14 - not tried Lucene)
{display name="categories" format="categorylist" singleList="y"}
{display name="categories" format="categorylist" requiredParents="15,20" excludeParents="5,6"}
{display name="categories" format="categorylist" singleList="y" separator=", "}

(Tiki 9) Wiki Plugins
{display name="wikiplugin_addtocart" format="wikiplugin" code="tracker_field_42" description="tracker_field_43" price="tracker_field_44"}

(Tiki 11)
{display name="wikiplugin_img" format="wikiplugin" fileId="tracker_field_pic" thumb="box" default="fileId=42"}


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
Show php error messages