X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   Sticky subs and Parent Header (https://forum.x-cart.com/showthread.php?t=16837)

hcabarcas 09-24-2005 11:44 AM

Sticky subs and Parent Header
 
Newbie here but just wanted to share a quick tip: separate root categories from subcategories; maintain the subcategories menu even if clicking on a link within the subcategories; and most importanty (at least as my needs were concerned)...use the parent category as a header ("you're here") indicator. Although the "you're here" indicator I cooked up, the rest was provided by a helpful person on the forum. Thanks for helping me get through this project.


Code:

{if ($navigation_page eq "")||($navigation_page eq "1")}{strip}
{section name=position loop=2}

{if not %position.first%}{$location[position].0}{/if}
{if $location[position].0 ne "" }{/if}

{/section}
{/strip}{/if}

{section name=cat_num loop=$allcategories}
{if $allcategories[cat_num].parentid eq $location[1].1|replace:"home.php?cat=":""}
{ $allcategories[cat_num].category|escape }
{/if}
{/section}


Lucent88 09-24-2005 07:17 PM

Don't really understand the mod. Can you provide a demo for everyone!! :D

hcabarcas 09-25-2005 07:28 AM

Yes, the site is still in development and I'm a first time X-Cart user but click the Hosiery/Lingerie link at the left. To the right, you'll then see the sub categories with the main category name (header) above it in red. Click on 2/3 Pc. Sets and you'll see the menu sticks.

http://mystikdesires.com/shop/home.php

garry 09-25-2005 12:42 PM

Looks a great mod, however whereabouts does this code go?

garry 09-25-2005 12:49 PM

Ignore my last post, it can go in the home.tpl if needed or products.tpl I presume.

Thanks


All times are GMT -8. The time now is 06:59 AM.

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