W3TPL/sysdata
< W3TPL
Jump to navigation
Jump to search
About
"Sysvar" syntax is a way of accessing various bits of information provided by the system under different circumstances. Any value prefixed with "@" will be treated as a reference to system data (yes, there are potential conflicts with this form... working on that; they are resolvable).
Names
- @title: information about the current page title
- .id: the article ID
- .full': namespace:subject
- .subject': just the part after the namespace and before any slashes (i.e. not the subpage name)
- .name': just the part after the namespace (including any subpages)
- .url': URL for the page
- @row: information about the current data row
- .name: name of the field (column) to access
- @mem: current memory usage, for debugging (this is a kluge and should probably be made more useful or eliminated)
- @user: information about the user currently viewing the page
- .login: user's login -- $wgUser->getName()
- .dbkey: user's login in URL format -- $wgUser->getTitleKey();
- .id: user's database ID -- $wgUser->getID();
- .can: user has permission to do specified action? -- $wgUser->isAllowed(action);
- .rights: user rights -- $wgUser->getRights(), converted to a prefix-separated list
- .email: user's email address, if known)-- $wgUser->getEmail()
- .name: user's full name, if known -- $out = $wgUser->getRealName();
- @query.name: value of $_GET["name"]
- @post.name: value of $_POST["name"]
- @env.name: value of $_ENV["name"]
- @sql: the last SQL statement executed by W3TPL (for debugging)
Examples
<xml> <let name=pg_title val="@row.page_title" /> </xml>