X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Show description in subcatergories.tpl (help with code) (https://forum.x-cart.com/showthread.php?t=33486)

concepts 08-26-2007 05:09 AM

Show description in subcatergories.tpl (help with code)
 
Hello,

I want to show the description of the subcategories in the subcategories.tpl under the name of the category.

I tried this

{* <a href="home.php?cat={ $subcat.categoryid}">-
{$subcat.category.description|strip_tags|indent:5| truncate:400:"...":true}</a></font> *}

but it doesnt seem to be working. Can anyone look at this code and give me some ideas. Thanks

concepts 08-29-2007 05:00 PM

Re: Show description in subcatergories.tpl (help with code)
 
Anyone help?

Jon 08-29-2007 09:21 PM

Re: Show description in subcatergories.tpl (help with code)
 
Try {$subcat.description}

inebriate 08-30-2007 01:00 AM

Re: Show description in subcatergories.tpl (help with code)
 
you need to edit categories.php because only the current category (the category id that is in your address bar) will get its description passed on to the template

you will have to pass the categories' ids into the function func_get_category_data() or write your own function that does a query to only grab descriptions


All times are GMT -8. The time now is 07:03 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.