Wiki Argument Variables | |
This syntax represents some variables which can be used in Tiki, like: user, page, itemId. With a simple Wiki Syntax using double curly brackets around them, (once this preference is enabled in "Editing & Plugins" control 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. The feature must be set at : Admin (tiki-admin.php) -> Editing and Plugins -> Wiki argument variables Note about parsing of the Argument Variables Because of their nature and the ability to be interpreted from the URL the Wiki argument variables need to be parsed as last, after all the parsing is done. So any argument variable like {{page}} will be interpreted inside any wiki plugin (e.g. PluginCode) or wiki syntax. To display a wiki argument variable unparsed you can escape the first bracket using the np (non parseable) tag: ~np~{~/np~{page}} .
|
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,
|
User variable | |
{{user}} will display the user login as per the settings on the log-in control panels. If you enabled "Use email as username" it will display the user email. (this variable value is not synchronised with the display real name options) ExampleIf you put this syntax on a page named "My Profile": * #{{itemId}} * {{page}} * {{user}} * {{domain}} * {{domainslash}}
|
Live example | |
This: Copy to clipboard
|
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}}
Follow the link to give a value to lalala: tiki-index_raw.php?page=Wiki+Argument+Variables&lalala=trololo |
Example in a profile | |
You can see it in action in this profile:
|
URL parameter variable | |
You can use URL parameter to pass and create a variable to be displayed on a Wiki page or be used in a plugin. |
Example | |
Click on this link (Wiki-Argument-Variables?testVar=Nice) to populate the variable "testVar" on this page that will be displayed below. (empty when you load the page without the URL parameter)
Alias names for this page:
|