| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Horizontal menu loop until end of screen | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() I need to create a loop to display the horizontal menu items until it reaches the end of the screen and then start on the next line. I have written the following code which displays one menu item on the first line and then the rest on the second.
<table cellpadding="0" cellspacing="0" > <tr > {foreach from=$categories item="category" name="h_categories"} {if $smarty.foreach.h_categories.first} <td class="hcNonActiveItembr{$category.categoryid}" height="25" nowrap="nowrap" valign="bottom"> <a href="home.php?cat={$category.categoryid}" class="hcLink" onmouseover="rollover('{$category.category}1','{$c ategory.category}1.gif')" onmouseout="rollover('{$category.category}','{$cat egory.category}.gif')"> <img src="{$ImagesDir}/custom/{$category.category}.gif" name="{$category.category}.gif" alt="{$category.category}"></a> </td> </tr> <tr> {else} <td class="hcNonActiveItembr{$category.categoryid}" height="25" nowrap="nowrap" valign="bottom"> <a href="home.php?cat={$category.categoryid}" class="hcLink" onmouseover="rollover('{$category.category}1','{$c ategory.category}1.gif')" onmouseout="rollover('{$category.category}','{$cat egory.category}.gif')"> <img src="{$ImagesDir}/custom/{$category.category}.gif" name="{$category.category}.gif" alt="{$category.category}"></a> {/if} {/foreach} Please help.
__________________
Chris Berendt X-Cart Version 4.1.9 |
|||||||
#2
|
|||||||
|
|||||||
![]() Welcome to the X-Cart forums! Please start by reading the following thread, which will help you get started and hopefully make your experience here a positive one:
http://forum.x-cart.com/showthread.php?t=23970 Please note that this link is not an answer to your question, but we need you to update your signature with your X-Cart version so that we can answer your question correctly. Thanks! ![]()
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
#3
|
|||||||
|
|||||||
![]() Thank you very much for this I am an absolute beginer
__________________
Chris Berendt X-Cart Version 4.1.9 |
|||||||
|
|||
X-Cart forums © 2001-2020
|