![]() |
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 $ *} 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? |
Nevermind
I figured it out.
I used this: Code:
{php}func_print_r($this->_tpl_vars);{/php} to view what variables I had available on the page I'm working on. I saw that the variable [description] was not listed. So I went to include/categories.php and added Code:
$sql_tbl[categories].description to the line: Code:
if ($short_list) { $to_search = "$sql_tbl[categories].categoryid,$sql_tbl[categories].parentid,$sql_tbl[categories].categoryid_path,$sql_tbl[categories].category,$sql_tbl[categories].product_count,$sql_tbl[categories].description,$sql_tbl[categories].avail,$sql_tbl[categories].order_by"; and the rest is history! Thanks for all your "help" forum people. |
All times are GMT -8. The time now is 11:59 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.