Global Variables

From Aikiframework wiki

Jump to: navigation, search


Basic Variables

  • [username] - Displays the username of the user accessing this widget
  • [userid] - Displays the userid of the user accessing this widget
  • [full_name] - Displays the full_name of the user accessing this widget
  • [user_group_level] - displays user group level
  • [user_permissions] - displays user permission


  • [language] - Displays the current language in use if set by url ?language=english, if not set by url it displays the default language
  • [direction] - Displays the current direction of site in use (ltr or rtl)
  • [page] see [1]
  • [records_num] - Displays the number of results returned from the main Sql Statement
  • [site_name] - Displays the current site full name
  • [site] - Displays the current site in use (shortname)
  • [view] - Displays the current view in use
  • current_month - Without [], display current month
  • current_year - Without [], display current year
  • current_day - Without [], display current day
  • [root] - display current web root (http://mysite.com
  • [root-language] - display current web root/language
  • [site_prefix] - displays current site prefix
  • [view_prefix] - displays current view prefix
  • [route] - displays current root/site/view/language.
  • [route] - displays current relative root: /site/view/language


  • [pagination] - will make the pages links and buttons displayed in the place where this markup is added, for example if you want it at the top of the widget instead of the bottom. please note that using this without [no_pagination] will make two copies of the page links, so if you just want the pagination links to be displayed in specific place you have to first add [no_pagination] anywhere, and then add [pagination] in the place where you want it to get displayed
  • [no_pagination] - will entirely remove the default pages links and buttons from the widget while keeping the pagination functionality available.
  • [next] see [2]
  • [previous] see [3]
  • [root] - path to the root folder - if you placed you images inside the folder /assets/images than output them with [root]/assets/images/xyz.jpg

POST and GET

You can also retrieve a value send by HTTP POST or GET using:

  • [GET[name]]
  • [POST[name]]
<input name='search' value='[GET[search]]' type='text'>

Aiki have two configuration variables to allow or not, GET and POST sustitution:

  • show_gets (default true)
  • show_post (default true)

Advanced

To get aiki-level configuration variables, it takes a bit more work.

You have to create a widget that selects the config data:

select config_data from aiki_config

Then inside the widget: ((config_data[plupload_max_file_size])) ((config_data[allowed_extensions]))

This array feature is documented on Aikimarkup#Database_markup

((upload_extra[featuring])) display the field "featuring" from the serialized array stored in db field "upload_extra" if exists

Personal tools