Smarty variables can be displayed by using the eval Smarty function. The available Smarty variables for a page can be viewed by Admins by clicking the "Smarty debug window" option in the Quick Administration menu. Or add ?show_smarty_debug=1 to the page address (or &show_smarty_debug=1 if there are already other url parameters). See below examples.
Smarty variables - page name
This code:
Copy to clipboard {smarty name="eval" var="{$page}"}
Would produce on this page:
PluginSmarty
Smarty global variables - domain name
Global variables can be accessed too, such as the domain name -
This code:
Copy to clipboard {smarty name="eval" var="{$smarty.server.HTTP_HOST}"}
Would produce on this site:
doc.tiki.org.
Preferences - metatag keywords
This code:
Copy to clipboard {smarty name="eval" var="{$prefs.metatag_keywords}"}
Would produce on this site:
documentation, tiki, tikiwiki, document, help, install, wiki syntax
|