> Main > Products and Services > Purchase > Company
English / Russian


CNCat 4.2 User Manual

© "CN-Software" Ltd. 2002-2008
Previous | Table of Contents  | Next

Variables Display

Format 1: {$variable_name}

Format 2: {$array_name[index1] }

Format 3: {$array_name[index1][index2]}

Example 1: {$CNCAT[item][link_url]}

Example 2: {cn_str($CNCAT[item][item_title])}

It is used for displaying variables and arrays elements. For instance, Example 1 shows display of a link URL.

Example 2 uses additional function cn_str(), equal to PHP-function htmlspecialchars(). This function prevents from insertion of harmful JS and HTML-code. It is recommended to use this function for displaying of all string variables.

Note: Arrays indexes are defined without inverted commas.

For the sake of safety the following variables are available in templates at present:

  1. $CNCAT array, containing all information about a page and displayed data;
  2. $THEMEURL root URL for theme files;
  3. $CNCAT_ENGINE CNCat engine object.

Previous | Table of Contents  | Next