> Главная > Продукты и услуги > Купить > Компания
English / Русский

Текущая версия

CNCat 4.4.2

CNCat 4.1.1 Frequently Asked Questions


How to Modify Catalogue Design?

The instructions on how to modify design see in «Design Modification» manual.

How to Insert PHP-Code onto the Page?

  1. You can create files _top.php and _bottom.php in the catalogue root folder. These files will be executed and enabled in the beginning and in the end of all catalogue user pages.

  2. Or you can use the way PHP-code is inserted for banners (file /cncat_config/banners.php) see section «Banners».


How to Enable Banners?

First, enable the option «Display banners» (Settings – Catalogue – General Setting).

Then, find banners.default.php in /cncat_config/ folder and copy it into the banners.php.

Go to the catalogue and check the enabled banners.

How to Modify Banner Code?

The code for banners is defined in /cncat_config/banners.php file.

Each banner is described in the following way:

$CNCAT["banner"]["banner ID"] =<<<CNCAT_40_BANNER

banner code


Also you can change the code for the banners you need and delete it for useless banners.

By default, there are seven banners which ID's are listed below:

Banner code can contain any HTML-text except for the string «CNCAT_40_BANNER».

Also, you can define the banner code as a simple string, for example:

$CNCAT["banner"]["banner_identifier"] = "banner code";

In this case, you need to place symbol «\» before the double quotes, for example:

$CNCAT["banner"]["page_top"] = "Ltd \"Catalogue-Construct\" – constructing catalogues.";

How to Add New Banner?

In case none of the default locations of the standard banners suites you, you can either change the location of one of seven banners, or add your own banner.

To add new banner, create the identifier for it, for example, «my_banner». Then describe this banner code in the same way as a standard one.

After that, add the banner into the desired place in the design theme, for example:


How to Swap Banners According to Current Category?

In the banners.php file, you can insert arbitrary PHP-code, which will display banners depending on the current category.

The identifier of each category is displayed in the section «Categories Management» of the administrator interface.

To get the identifier of the current category, use:

$cid = $CNCAT["page"]["cid"];

Then, display banner depending on the category, for example:

if ($cid==10)


$CNCAT["banner"]["banner_identifier"] =<<<CNCAT_40_BANNER

banner code for the category 10





$CNCAT["banner"]["banner_identifier"] =<<<CNCAT_40_BANNER

banner code for other categories



See also «How to Get Information on Current Category?».


How to Get Information on Current Category?

Information on current category is stored in the array $CNCAT[“page”][“cat”]. The values of the array elements are the following:


Category identifier. Also availabe using variable $CNCAT[“page”][“cid”]


Parent categories and current category identifiers, separated by the symbol «/», for example: «311/69/206» (311 – root, 206 – current category).


Parent category identifier. It is equal to «-1» for the root category


The list of child categories identifiers (in one line separated by commas), for example: «15,23,53»


Category name


The part of the path to the current category, for example: «business» (without «/» in the beginning and in the end of line)


Full path to the current category, for example: «auto/business» (without «/» in the beginning and in the end of line)


Path of the current category, for example: «/cncat/auto/business/»


The number of links within the category


The number of links within the category, including the links within the child categories


Shows whether the category is the link or not


MIME-code for the category image. Empty line if there is no image


Keywords for META keywords tag


Description for META description tag