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

Documentation

Design Themes Modification When Updating from CNCat 4.1.2 to CNCat 4.1.3

© "CN-Software" Ltd. 2002-2008
support@cn-software.com
www.cn-software.com
Previous | Table of Contents  | Next

item.tpl

Modifications:

Ability to display additional fields has been added.

New Elements:

Apply Modifications:

  1. Insert the code for displaying additional fields into the item template:

{DISPLAY EXTFIELDS}

for example, you can insert it below the following code:

                       <tr><td colspan="1" class="url">

                           {IF $CNCAT[config][links_broken_notify]}

                               {cn_str($CNCAT[item][link_url])} <a href="javascript:baditem('{$CNCAT[item][item_id]}')" title="{$CNCAT[lang][broken_notify]}"><img src="{$THEMEURL}images/badlink.gif" alt="{$CNCAT[lang][broken_notify]}" /></a>

                           {ENDIF}

                       </td></tr>

  1. Add the template for displaying expanded fields. This template is one and the same for links and articles. To do this, above the following code line:

{TEMPLATE admin_rating_top}{/TEMPLATE}

insert code

<!--

1 - int,

2 - double,

3 - varchar(255),

4 - datetime,

5 - text

-->

 

{TEMPLATE item_ext_field}

   {IF $CNCAT[extfield][type] == 1 || $CNCAT[extfield][type] == 2}

       {IF is_numeric($CNCAT[extfield][value])}

           <tr><td></td><td colspan="2">{cn_str($CNCAT[extfield][title])}: {cn_str($CNCAT[extfield][value])}</td></tr>

       {ENDIF}

   {ELSE}

       {IF $CNCAT[extfield][value]}

           {IF $CNCAT[extfield][type] == 3}

               <tr><td></td><td colspan="2">{cn_str($CNCAT[extfield][title])}: {cn_str($CNCAT[extfield][value])}</td></tr>

           {ENDIF}

           {IF $CNCAT[extfield][type] == 4}

               <tr><td></td><td colspan="2">{cn_str($CNCAT[extfield][title])}: {cn_date($CNCAT[extfield][value])}</td></tr>

           {ENDIF}

           {IF $CNCAT[extfield][type] == 5}

               <tr><td></td><td colspan="2">{cn_str($CNCAT[extfield][title])}: {cn_str($CNCAT[extfield][value])}</td></tr>

           {ENDIF}

       {ENDIF}

   {ENDIF}

{/TEMPLATE}

 


Previous | Table of Contents  | Next