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)
-   -   How do you get the category href url? (https://forum.x-cart.com/showthread.php?t=29647)

pdheady 03-12-2007 07:22 PM

How do you get the category href url?
 
I am customizing my menu and need to setup the links for each category id that it loops through what is the code to create the links?

Here's my code so far:

{if $cat eq $categories[cat_num].categoryid || $current_category.parentid eq $categories[cat_num].categoryid}

<img src="{$ImagesDir}/menutitle/{$cat}.jpg" align="absbottom" style="border-bottom: 1px solid white">

{section name=subcat loop=$allcategories}
{if $allcategories[subcat].parentid eq $categories[cat_num].categoryid}
<div style="background-color: #D8ECED; border-bottom: 1px solid white; font-color: #271E3D; font-family: tahoma font-size: 11px">
<div style="padding-top: 6px; padding-bottom: 6px">&nbsp;&nbsp;&nbsp;<img src="{$ImagesDir}/left-arrow2.jpg" width="3" height="5" alt=">">&nbsp;&nbsp;&nbsp;
<a href="home.php?cat={$somethinghere}" class="menulink1">{$allcategories[subcat].category}</a>
</div></div>
{/if}
{/section}

{/if}

inebriate 03-12-2007 09:26 PM

Re: How do you get the category href url?
 
using your code, it should be

{$allcategories[subcat].categoryid}


All times are GMT -8. The time now is 03:35 PM.

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