Table of Contents

Nucleus CMS Skin & Template variables

Skin and template variables.

Skin/Templatevar: include

Includes a textfile into the output. The contents of the file is not parsed in any way, so you cannot use skin/templatevars or use PHP code (see parsedinclude and phpinclude if you want parsed includes)

all

<%include(filename.txt)%>
<%include(/home/user/myself/filename.txt)%>
<%include(http://mydomain.com/filename.html)%>

Skin/Templatevar: parsedinclude

Includes a file into the output. The contents of the file is parsed by the Nucleus skin/template parser, so you can use skin/templatevars. (see phpinclude and include for other include options)

all

<%parsedinclude(filename.txt)%>
<%parsedinclude(/home/user/myself/filename.txt)%>

Skin/Templatevar: phpinclude

Includes a php-file into the output. The contents of the file is parsed by the PHP parser, so be careful. Nucleus skin/templatevars are not parsed! (see parsedinclude and include for other include options).

all

<%phpinclude(filename.php)%>
<%phpinclude(/home/user/myself/filename.php)%>

Skin/Templatevar: phpinclude vars

The following global variables are accessible from within files included by the phpinclude skin/templatevar:

$GATEWAY_INTERFACE, $SERVER_NAME, $SERVER_SOFTWARE
$SERVER_PROTOCOL, $REQUEST_METHOD, $QUERY_STRING
$DOCUMENT_ROOT, $HTTP_ACCEPT, $HTTP_ACCEPT_CHARSET
$HTTP_ACCEPT_ENCODING, $HTTP_ACCEPT_LANGUAGE
$HTTP_CONNECTION, $HTTP_HOST, $HTTP_REFERER
$HTTP_USER_AGENT, $REMOTE_ADDR, $REMOTE_PORT
$SCRIPT_FILENAME, $SERVER_ADMIN, $SERVER_PORT
$SERVER_SIGNATURE, $PATH_TRANSLATED, $SCRIPT_NAME
$REQUEST_URI, $argv, $argc, $PHP_SELF
$HTTP_COOKIE_VARS, $HTTP_GET_VARS, $HTTP_POST_VARS
$HTTP_POST_FILES, $HTTP_ENV_VARS, $HTTP_SERVER_VARS
$HTTP_SESSION_VARS, $PATH_INFO, $HTTPS
$HTTP_RAW_POST_DATA, $HTTP_X_FORWARDED_FOR

For others variables, you'll need to add 'global $varname;' explicitly in your code

Skin/Templatevar: plugin

Calls a plugin

^ Name ^ Contents ^

PlugNameName of the plugin that should be called. This name is case sensitive!

all

<%plugin(Calendar)%>
<%plugin(LastComments,myweblog)%>
<%LastComments(myweblog)%>

Skin/Templatevar: set

Sets a parser property.

all

<%set(IncludeMode,skindir)%>
<%set(IncludePrefix,somedir/)%>

Skin/Templatevar: skinfile

Used by imported skins to put a link relative to the skins-URL. Use it in conjunction with the IncludePrefix parser property to get the best results

all

<%skinfile(mystyle.css)%>

Skin/Templatevar: skinname

Inserts the name of the skin that's currently being used.

None

all

<%skinname%>