User Tools

Site Tools


nupusi:nucleus:helpskintemp

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)

  • Arguments
  • filename: the name of the file to be included (either relative to the position of index.php, or absolute). Note that an URL can also be used here.
  • Notes
  • This tag is affected by the parser settings IncludeMode and IncludePrefix
  • Skintypes

all

  • Examples
<%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)

  • Arguments
  • filename: the name of the file to be included (either relative to the position of index.php, or absolute)
  • Notes
  • This tag is affected by the parser settings IncludeMode and IncludePrefix
  • From inside the included file, you can call <%parsedinclude(filename)%> again. To avoid endless loops, the maximum depth level you can go is 3.
  • Skintypes

all

  • Examples
<%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).

  • Arguments
  • filename: the name of the file to be included (either relative to the position of index.php, or absolute)
  • Notes
  • This tag is affected by the parser settings IncludeMode and IncludePrefix
  • Your file will be included using the standard php include() command. This command will be called from inside a class method, so you'll need to declare which global variables you want to access yourself. Most of the standard variables are automatically declared global by Nucleus itself.
  • Skintypes

all

  • Examples
<%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

  • Arguments
  • Required

^ Name ^ Contents ^

PlugNameName of the plugin that should be called. This name is case sensitive!
  • Extra parameters can be added, depending on the plugin
  • Notes
  • When a plugin name does not conflict with existing variables, it can be called directly using <%PluginName(parameters)%>
  • Skintypes

all

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

Skin/Templatevar: set

Sets a parser property.

  • Arguments
  • property: name of the property
  • value: value of the property
  • Skintypes

all

  • Examples
<%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

  • Arguments
  • filename: filename of which you want the correct URL
  • Skintypes

all

  • Examples
<%skinfile(mystyle.css)%>

Skin/Templatevar: skinname

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

  • Arguments

None

  • Skintypes

all

  • Examples
<%skinname%>
nupusi/nucleus/helpskintemp.txt · Last modified: 2008/12/06 13:56 (external edit)