History: Wiki Argument Variables
Preview of version: 32
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
If you put this syntax on a page named "My Profile":
* #{{itemId}} (on a tracker item) * {{page}} (on a wiki page) * {{page}} (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)
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 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=trololo
Alias names for this page:
ArgumentVariables | argvars | Argument Variables | arg vars | ArgumentVariable | argvar | Argument Variable | arg var