![]() |
accessing category description within smarty code?
hey guys
i have some smarty code that works - and outputs the category names and their ids and links. Code:
{section name=cat_num loop=$categories} what i want to do is throw the category description in there as well. i had hoped that throwing in this: Code:
{$categories[cat_num].description} might do the trick, but apparantly not (it seemed logical). can anyone reveal to me the secret? thanks in advance, murray |
figured it out -- thought i'd post it here in case anyone was curious.
in categories.php, the code read: Code:
if ($short_list) { i added the field i needed (description) to the SQL statement like this: Code:
if ($short_list) { this then allowed me to use Code:
{$categories[cat_num].description} in my categories.tpl |
Hello Murray,
Nice hint. Another hint. There is a simple way to see the structure of the hash: Code:
{foreach name=foo item=bar from=$categories} Best regards. |
All times are GMT -8. The time now is 06:56 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.