Loading...
 
Skip to main content

History: Wiki Argument Variables

Preview of version: 48

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

 {{itemId}}      (on a tracker item)
 {{page}}        (on a wiki page)
 {{pageid}}      (id from a wiki page; added in Tiki 12.1)
 {{user}}        (when a user is logged in)
 {{domain}}      (site domain; added in Tiki 12.1)
 {{domainslash}} (site domain ending with a slash; added in Tiki 12.1)
 {{domainslash_if_multitiki}} (only when in a multitiki installation, 
site domain ending with a slash;
if the page doesn't belong to a multitiki installation,
nothing is returned; added in Tiki 12.1) {{lastVersion}} (last version of the wiki page; added in Tiki 12.2) {{lastAuthor}} (last editor of the wiki page; added in Tiki 12.2) {{lastModif}} (last modification date, in short format,
of the wiki page; added in Tiki 12.2) {{lastItemVersion}} (last version of the tracker item
indicated in the url; added in Tiki 12.2) {{lastItemAuthor}} (last editor of the tracker item
indicated in the url; added in Tiki 12.2) {{lastItemModif}} (last modification date, in short format,
of the tracker item indicated in the url; added in Tiki 12.2) {{lastApprovedVersion}} (last approved version of the wiki page
when revision approval is on; added in Tiki 12.3) {{lastApprover}} (last approver of the wiki page
when revision approval is on; added in Tiki 12.3) {{lastApproval}} (last approval date, in short format, of the wiki page
when revision approval is on; added in Tiki 12.3) {{currentVersion}} (current version being displayed of the wiki page
when revision approval is on; added in Tiki 14.0) {{currentVersionApprover}} (approver of the current version being displayed
when revision approval is on; added in Tiki 14.0) {{currentVersionApproval}} (approval date, in short format, of the current version being displayed
when revision approval is on; added in Tiki 14.0) {{currentVersionApproved}} (indicate whether current version being displayed of the wiki page
is approved or not when revision approval is on; added in Tiki 14.0)

Example

If you put this syntax on a page named "My Profile":

* #{{itemId}}
* {{page}}
* {{user}}
* {{domain}}
* {{domainslash}}


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 4091 with the name "Wiki Argument Variables". Check wiki source!.
Your name is .

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

*''lalala'' is: {{lalala}}
*''lalala'' is:  {{lalala|nothing}} 

Shows:

  • lalala is:
  • lalala is:

Follow the link to give a value to lalala: tiki-index.php?page=Wiki+Argument+Variables&lalala=torololo


Alias names for this page:
ArgumentVariables | argvars | Argument Variables | arg vars | ArgumentVariable | argvar | Argument Variable | arg var | Wiki Argument Variable

History

Advanced
Information Version
Marc Laporte 60
Bernard Sfez / Tiki Specialist 59
Bernard Sfez / Tiki Specialist Added information about populated a wiki variable from an URL parameter 58
Bernard Sfez / Tiki Specialist 57
Bernard Sfez / Tiki Specialist 56
Bernard Sfez / Tiki Specialist 55
Bernard Sfez / Tiki Specialist 54
Bernard Sfez / Tiki Specialist 53
Bernard Sfez / Tiki Specialist Adding informations about the user variable 52
luciash d' being 🧙 51
luciash d' being 🧙 50
Xavier de Pedro added 2 new aliases and link to profile using wiki argument variables 49
Xavier de Pedro Edit restored by rescue script 2017-04-24T18:09:12+00:00 48
crystalhhc 47
crystalhhc 46
crystalhhc 45
crystalhhc 44
Xavier de Pedro 43
Xavier de Pedro added the new wiki argument variables about current version approval since Tiki14.0 42
Xavier de Pedro 41
Xavier de Pedro added info on the 3 new wiki argument variables 40
Xavier de Pedro 39
Xavier de Pedro 38
Xavier de Pedro 37
Xavier de Pedro 36
Xavier de Pedro 35
Xavier de Pedro 34
Xavier de Pedro 33
Xavier de Pedro 32
Xavier de Pedro 31
Xavier de Pedro 30
Xavier de Pedro 29
Xavier de Pedro 28
Xavi (as xavidp - admin) 27
Xavier de Pedro 26
Xavier de Pedro 25
Xavier de Pedro 24
Jean-Marc Libs 23
Jean-Marc Libs 22
Jean-Marc Libs 21
Jean-Marc Libs 20
Jean-Marc Libs 19
Jean-Marc Libs 18
Jean-Marc Libs 17
Jean-Marc Libs 16
Jean-Marc Libs 15
Marc Laporte This is not a stub anymore 14
Marc Laporte restore } so they are not interpreted 13
Michal.Kress 12
Marc Laporte 11
  • «
  • 1 (current)
  • 2