![]() |
New Main/Root Categories Page Mod needs last bit of help
I am so close to posting a new mod for a main/root categories page that uses content from a static page and a dynamic listing of root cats, but i don't know how to show the root cat icon.
Basically i took code out of subcategories.tpl and modified it to list root cats then inserted it into an if statement inside pages.tpl that tests if we are on the root cat static page. See moded pages.tpl below: Code:
{* $Id: pages.tpl,v 1.3.2.1 2005/01/19 06:42:51 max Exp $ *} This line should show the root cat icon but it is still for subcat icon: <TD valign="top" rowspan="{count value=$categories print="Y"}"><IMG src="{if $current_category.icon_url}{$current_category.icon _url}{else}{$xcart_web_dir}/icon.php?categoryid={$cat}{/if}"></TD> Any ideas? |
Re: New Main/Root Categories Page Mod needs last bit of help
Try this:
Code:
<img src="{if $c.icon_url}{$c.icon_url}{else}{$xcart_web_dir}/image.php?id={$cat}&type=C{/if}"> - Mike |
Re: New Main/Root Categories Page Mod needs last bit of help
are you displaying a categories listing with icons on the main page?
if so, look at http://forum.x-cart.com/showthread.php?t=32237 , I made a similar mod but if I remember correctly, I used welcome.tpl to insert my code to put it at the top and in a seperate section |
Re: New Main/Root Categories Page Mod needs last bit of help
Hey you guys, thanks for the help.
The technique I used was to create a static page for my Main/Root category page - so the client could insert copy in it easily. I do that by modifying pages.tpl with an if statement to include categories.tpl - see Beginners Example of Static Page with Dynamic Content. I tried modifying categories.tpl to show icons (from within pages) but to no avail. I think i already tried mffowler's example code earlier and it didn't seem to work. Eventually I gave up and the client is happy not having the icons so if we figure this out now - I guess it would be to complete a mod for x-cart users' sake. |
Re: New Main/Root Categories Page Mod needs last bit of help
you may want to look at http://forum.x-cart.com/showthread.php?t=32195 ? it uses positioning rather than id number
|
All times are GMT -8. The time now is 09:53 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.