| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Link to sub-category in menu | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
Link to sub-category in menu
I've created language variables for all my categories, but I don't know how to add a link to a (sub-)categoryto another menu properly.
I used "<li><a href="home.php?cat=47">Horror</a></li>" and this works, but the names are static. What do I need to change so the title of this link automaticaly displays the correct language variable? Thanks, Alexandra |
|||||||
#2
|
|||||||
|
|||||||
Re: Link to sub-category in menu
Quote:
Huh? There is no need to make language vars for categories or products. Use Smarty vars to make your links... such as: {$catid} look at the code used in fancy categories for examples. /skin/common_files/modules/Flyout_Menus/Icons/fancy_subcategories.tpl Basically, let xcart (smarty) do the work.
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4 |
|||||||
#3
|
|||||||||
|
|||||||||
Re: Link to sub-category in menu
If you mean, displaying a category name in alternative site language in a different place in the page, you could try the following code (I am not sure if this is what you mean):
Code:
The variable names might differ, according to your xcart version.
__________________
Vasilis Vrod. X-Cart Development, Maintenance & Customization www.craftforweb.com vasilis@craftforweb.com |
|||||||||
#4
|
|||||||
|
|||||||
Re: Link to sub-category in menu
Quote:
Thanks for the reply, but although I've checked fancy_subcategories.tpl, I still don't understand how to fix my problem.
__________________
X-Cart 4.5 |
|||||||
#5
|
|||||||
|
|||||||
Re: Link to sub-category in menu
Quote:
I just want the sub-categories from category "All Products" to be visible in another menu. I got this to work by adding this: <li><a href="home.php?cat=47">Horror</a></li> <li><a href="home.php?cat=50">Sci-Fi Science Fiction</a></li> <li><a href="home.php?cat=6">Disney</a></li> <li><a href="home.php?cat=40">Music & Dance</a></li> <li><a href="home.php?cat=44">Western</a></li> <li><a href="home.php?cat=48">War</a></li> <li><a href="home.php?cat=42">Martial Arts</a></li> <li><a href="home.php?cat=45">James Bond 007</a></li> <li><a href="home.php?cat=41">Kids & Animation</a></li> <li><a href="home.php?cat=43">(S)exploitation</a></li> <li><a href="home.php?cat=46">Marvel & Superheroes</a></li> <li><a href="home.php?cat=49">Vintage-Classic Pre-1970</a></li> However, I want X-Cart to automaticaly display the corresponding title of that sub-category in the correct language. The way I did it they are the same in all languages. What code do I need to add or replace the above titles with?
__________________
X-Cart 4.5 |
|||||||
#6
|
|||||||||
|
|||||||||
Re: Link to sub-category in menu
In your initial post, you had referred to one specific subcategory with id 47.
If you mean displaying all subcategories in a different place, you could just insert: Quote:
If I missed something, let me know.
__________________
Vasilis Vrod. X-Cart Development, Maintenance & Customization www.craftforweb.com vasilis@craftforweb.com |
|||||||||
#7
|
|||||||
|
|||||||
Re: Link to sub-category in menu
Quote:
The specific subcategory with id 47 was used as an example, because I want to be able to add links to specific subcategories. When I try your code it adds a clone of the original categories menu. I just need links to all the sub-categories, minus the first one (All Our Products), from the main category "All Products".
__________________
X-Cart 4.5 |
|||||||
#8
|
|||||||
|
|||||||
Re: Link to sub-category in menu
Okay I fixed this problem:
I used "<li><a href="home.php?cat=47">Horror</a></li>" Changed this to: <li><a href="home.php?cat=47">{$lng.lbl_genre_horror}</a></li> Now you can set different titles for all languages and they can be different from the actual category name. Hope someone else can profit from this solution.
__________________
X-Cart 4.5 |
|||||||
|
|||
X-Cart forums © 2001-2020
|