Loading...
 

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, 
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)

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)

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

This:

Copy to clipboard
You are currently on the page ID -+{{pageid|undefined}}+- with the name "''{{page}}''". Check the [tiki-pagehistory.php?page=Wiki+Argument+Variables&source=0|wiki source]!. Your username is __{{user|nothing}}__.


Renders as:
You are currently on the page ID 4091 with the name "Wiki Argument Variables". Check the wiki source!.
Your username 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

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)
The variable testVar =

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

doc.tiki.org

Get Started

Admin Guide User Guide

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
Articles and Submissions
Backlinks
Banners
Batch
BigBlueButton audio/video/chat/screensharing
Blog
Bookmark
Browser Compatibility
Link Cache
Calendar
Category
Chat
Clean URLs
Comments
Communication Center
Compression (gzip)
Contacts (Address Book)
Contact us
Content Templates
Contribution
Cookie
Copyright
Credit
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
Draw
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)
Image Gallery
Import-Export
Install
Integrator
Interoperability
Inter-User Messages
InterTiki
Kaltura video management
Karma
Live Support
Login
Logs (system & action)
Look and Feel
Mail-in
Map with Mapserver
Menu
Meta Elements
Mobile Tiki and Voice Tiki
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
Shadowbox
Shadow Layers
Share
Shopping cart
Shoutbox
Slideshow
Smiley
Social Networks
Spam protection (Anti-bot CATPCHA)
Spellcheck
Spreadsheet
Stats
Surveys
Tags
Task
Tell a Friend, alert + Social Bookmarking
TikiTests
Theme CSS & Smarty
Tiki Manager
Trackers
Transitions
User Administration including registration and banning
User Files
User Menu
Watch
WebDAV
Webmail
Web Services
Wiki History, page rename, etc
Wiki Syntax
Wiki structure (book and table of content)
Workspace
WSOD
WYSIWYCA
WYSIWYG
XMLRPC

Tiki Newsletter

Delivered fresh to your email inbox!
Newsletter subscribe icon
Don't miss major announcements and other news!
Contribute to Tiki