Horizontal 'Categories' and/or 'Manufacturers' Menu Query
Hi,
I was looking to change the 'Categories' and/or 'Manufacturers' side menu to display as a horizontal navigation bar within the head.tpl. I realise that by far the easiest way would be to simply create a html table within head.tpl and populate it with the links but I would like to still be able to alter the menu within the admin section i.e. if I add a new category it will automatically add it to the 'Category' list as it does by default but for it to display horizontally rather than vertically. I have searched the 'Custom Mods & Templates' & others section but could not find anything that would work for the latest branch of xcart. Any assistance would be greatly appreciated. |
Code:
{section name=cat_num loop=$categories} use that |
Shan,
That works like a charm. Bostin' :D |
Quote:
The only problem is you get an extra "|" char at the end of the last category. I modified it and added a test: Code:
{section name=cat_num loop=$categories} |
This is definetly worth stashing in my bag of goodies for future reference, thanks guys. :wink:
|
which .tpl does this code relate to please
hi sorry to be so ignorant.....which .tpl is this code referring to ?
I've ran a find search using snippets of the code of the source ..without finding which .tpl it relates to. Any guidance appreciated. thanks chris |
The original poster wanted the categories printed at the top in a horizontal manner and the only place to put it is in the head.tpl.
|
For reference if you want the Manufactuers list to display horizontally you can use this code.
{section name=mid loop=$manufacturers_menu} {$manufacturers_menu[mid].manufacturer}{if not %mid.last%} | {/if}</FONT> {/section} :wink: |
Digging up an old topic...but with a new twist because of 4.1 Beta 2.
Here is the file: Code:
{if $config.General.root_categories eq "Y"} I am trying to eliminate the last bullet after the category list and {if not %categories.last%} does not work??? Any suggestions? Thanks, Louise |
Just FYI - figured it out.....correct would be:
Code:
{if $config.General.root_categories eq "Y"} :lol: :lol: |
All times are GMT -8. The time now is 08:51 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.