View Single Post
  #1  
Old 11-21-2005, 10:36 AM
 
Jennifer Martin Jennifer Martin is offline
 

Newbie
  
Join Date: Nov 2005
Posts: 4
 

Default Calling and Displaying Category Description within a List.

Here is the page I am currently working on:

http://10000waves.xynergy.com/FloatingWorld/home.php

You'll see 4 categories tiled underneath the large advertisement image. Each of the categories currently display the Category Name and the Category Icon. I am trying modify the page so that the Category Description is also displayed underneath the Category Name.

Here is the code I have so far within a custom tpl file I've created for this page:

Code:
{* $Id: category-index.tpl,v 1. 2005/11/20 15:15:49 mclap Exp $ *} <table width="100%" border="0" cellpadding="5" cellspacing="0" class="border-white" style="background-color:#4D79A0;"> <tr> <td><div align="left"> <a href="home.php?cat={$categories[2].categoryid}"> [img]GRAPHICS/store-main.gif[/img] </a> </div> <table border="0" cellpadding="0" cellspacing="0"> <tr> <td valign="top">[img]{$xcart_web_dir}/icon.php?categoryid={$categories[0].categoryid}[/img] </td> <td valign="top"><div style="margin-left:5px; margin-right:5px;"> {$categories[0].category} {$categories[0].description|escape:"html"} </div></td> <td valign="top">[img]{$xcart_web_dir}/icon.php?categoryid={$categories[1].categoryid}[/img] </td> <td valign="top"><div style="margin-left:5px; margin-right:5px;"> {$categories[1].category} {$current_category.description|regex_replace:"/[\n]/":" "} </div></td> </tr> <tr> <td>[img]{$xcart_web_dir}/icon.php?categoryid={$categories[2].categoryid}[/img] </td> <td valign="top"><div style="margin-left:5px; margin-right:5px;"> {$categories[2].category} {$current_category.description|regex_replace:"/[\n]/":" "} </div></td> <td>[img]{$xcart_web_dir}/icon.php?categoryid={$categories[3].categoryid}[/img] </td> <td valign="top"><div style="margin-left:5px; margin-right:5px;"> {$categories[3].category} {$current_category.description|regex_replace:"/[\n]/":" "} </div></td> </tr> </table></td> </tr> </table>

I have tried calling the category using the standard:

Code:
$current_category.description|regex_replace:"/[\n]/":" "}

As well as:

Code:
{$categories[2].description}

both to no avail.

Is there other syntax I can use to call this variable?
__________________
Xcart version 4.0.16
Reply With Quote