Design Themes Modification When Updating from CNCat 4.1.2 to CNCat 4.1.3
extended.tpl
Modifications:
Ability to display additional fields has been added.
New Elements:
- {DISPLAY EXTFIELDS} – place to display expanded fields. It uses ext_ext_field template (see below).
- Template ext_ext_field – provides additional fields on the page of detailed description.
- $CNCAT[extfield][type] – field type (1 - int, 2 - double, 3 - varchar(255), 4 - datetime,5 – text).
- $CNCAT[extfield][title] – field name.
- $CNCAT[extfield][value] – field value.
Apply Modifications:
- Insert the code for displaying additional fields into the ext template:
{DISPLAY EXTFIELDS}
after the following string
<tr><td class="name">{$CNCAT[lang][jumps_from]}:</td><td class="text">{cn_str($CNCAT[item][link_jumps_from])}</td></tr>
- At the end of the file, add ext_ext_field template:
{TEMPLATE ext_ext_field}
{IF $CNCAT[extfield][type] == 1 || $CNCAT[extfield][type] == 2}
{IF is_numeric($CNCAT[extfield][value])}
<tr><td class="name">{cn_str($CNCAT[extfield][title])}:</td><td class="text">{cn_str($CNCAT[extfield][value])}</td></tr>
{ENDIF}
{ELSE}
{IF $CNCAT[extfield][value]}
{IF $CNCAT[extfield][type] == 3}
<tr><td class="name">{cn_str($CNCAT[extfield][title])}:</td><td class="text">{cn_str($CNCAT[extfield][value])}</td></tr>
{ENDIF}
{IF $CNCAT[extfield][type] == 4}
<tr><td class="name">{cn_str($CNCAT[extfield][title])}:</td><td class="text">{cn_date($CNCAT[extfield][value])}</td></tr>
{ENDIF}
{IF $CNCAT[extfield][type] == 5}
<tr><td class="name">{cn_str($CNCAT[extfield][title])}:</td><td class="text">{cn_str($CNCAT[extfield][value])}</td></tr>
{ENDIF}
{ENDIF}
{ENDIF}
{/TEMPLATE}