History: Wiki Argument Variables
Source of version: 48
Copy to clipboard
! Wiki Argument Variables This name represents some variables which can be used in Tiki, like: user, page, itemId. With a simple ((Wiki Syntax)) using double angle brackets around them, once this preference is enabled in "Admin > Editing & Plugins" panel, you can put them in your wiki syntax enabled text area and have them to become automatically replaced by their actual value anywhere where they are used. !! Permanent variables {HTML()}<pre> <b> {{itemId}}</b> (on a tracker item) <b> {{page}}</b> (on a wiki page) <b> {{pageid}}</b> (id from a wiki page; added in Tiki 12.1) <b> {{user}}</b> (when a user is logged in) <b> {{domain}}</b> (site domain; added in Tiki 12.1) <b> {{domainslash}}</b> (site domain ending with a slash; added in Tiki 12.1) <b> {{domainslash_if_multitiki}}</b> (only when in a multitiki installation, <br/> site domain ending with a slash;<br/> if the page doesn't belong to a multitiki installation,<br/> nothing is returned; added in Tiki 12.1) <b> {{lastVersion}}</b> (last version of the wiki page; added in Tiki 12.2) <b> {{lastAuthor}}</b> (last editor of the wiki page; added in Tiki 12.2) <b> {{lastModif}}</b> (last modification date, in short format, <br/> of the wiki page; added in Tiki 12.2) <b> {{lastItemVersion}}</b> (last version of the tracker item <br/> indicated in the url; added in Tiki 12.2) <b> {{lastItemAuthor}}</b> (last editor of the tracker item <br/> indicated in the url; added in Tiki 12.2) <b> {{lastItemModif}}</b> (last modification date, in short format, <br/> of the tracker item indicated in the url; added in Tiki 12.2) <b> {{lastApprovedVersion}}</b> (last approved version of the wiki page<br/> when revision approval is on; added in Tiki 12.3) <b> {{lastApprover}}</b> (last approver of the wiki page<br/> when revision approval is on; added in Tiki 12.3) <b> {{lastApproval}}</b> (last approval date, in short format, of the wiki page<br/> when revision approval is on; added in Tiki 12.3) <b> {{currentVersion}}</b> (current version being displayed of the wiki page<br/> when revision approval is on; added in Tiki 14.0) <b> {{currentVersionApprover}}</b> (approver of the current version being displayed<br/> when revision approval is on; added in Tiki 14.0) <b> {{currentVersionApproval}}</b> (approval date, in short format, of the current version being displayed<br/> when revision approval is on; added in Tiki 14.0) <b> {{currentVersionApproved}}</b> (indicate whether current version being displayed of the wiki page<br/> is approved or not when revision approval is on; added in Tiki 14.0) </pre>{HTML} !! Example If you put this syntax on a page named "My Profile": {HTML()}<pre> * #{{itemId}} * {{page}} * {{user}} * {{domain}} * {{domainslash}} </pre>{HTML} it will produce (assuming you're viewing the page logged in as user admin): * #1 * My Profile * admin * doc.tiki.org * doc.tiki.org/ !! Live example You are currently on the page id {{pageid}} with the name "{{page}}". Check [tiki-pagehistory.php?page=Wiki+Argument+Variables&source=0|wiki source!]. Your name is {{user|nothing}}. !User defined variables When this option is active, it is possible to show the value of variables passed by argument on the URL. Note that a default value can be provided. !! Live example {HTML()}<pre>*''lalala'' is: {{lalala}} *''lalala'' is: {{lalala|nothing}} </pre>{HTML} Shows: ^ *''lalala'' is: {{lalala}} *''lalala'' is: {{lalala|nothing}}^ Follow the link to give a value to ''lalala'': [tiki-index.php?page=Wiki+Argument+Variables&lalala=torololo] Alias names for this page: (alias(ArgumentVariables)) | (alias(argvars)) | (alias(Argument Variables)) | (alias(arg vars)) | (alias(ArgumentVariable)) | (alias(argvar)) | (alias(Argument Variable)) | (alias(arg var)) | (alias(Wiki Argument Variable))