![]() |
Drop Down Menu For Categories
I have read a previous thread about creating a drop down menu for the categories.tpl. I am able to view the category drop down, but the text is not visible and when clicked on redirects to the home page. Code Shown Below...
{* $Id: categories.tpl,v 1.19 2003/11/11 14:02:32 svowl Exp $ *} {capture name=menu} {if $active_modules.Fancy_Categories ne ""} {include file="`$fancycategories_config.modules_path`/fancy_categories.tpl"} {else} {if $config.General.root_categories eq "Y"} <form name="form_cat" method="get" action="home.php"> <select name="cat" onChange="document.form_cat.submit()"> <option value="0" selected>Search By Category</option> {section name=cat_num loop=$categories} <option value="home.php?cat={$c.categoryid}">{$categories[cat_num].category}</option> {/section} </select> </form> {else} {section name=cat_num loop=$subcategories} <font class=CategoriesList>{ $subcategories[cat_num].category_name|escape }</font> {/section} {/if} {/if} {/capture} {include file="menu.tpl" dingbats="dingbats_categorie.gif" menu_title=$lng.lbl_categories menu_content=$smarty.capture.menu} |
Re: Drop Down Menu For Categories
Please don't post questions in the completed custom mods forum. Moving to Template Editing.
|
Re: Drop Down Menu For Categories
Code:
{section name=cat_num loop=$categories} Use this section code instead of your variant. |
Re: Drop Down Menu For Categories
1 Attachment(s)
I am still getting the same issue. I have attached a screenshot. Basically the form box opens but the font is not visible and when clicked on it redirects me to a homepage and not to a specific category.
|
Re: Drop Down Menu For Categories
Code:
<form method="get" action="home.php"> |
Re: Drop Down Menu For Categories
Yes, PhilJ is right. I've copied code of "section" and did not checked, is it right. There is foreach should be.
|
Re: Drop Down Menu For Categories
Thanks alot guys! It works!
|
Re: Drop Down Menu For Categories
Does this work with SEO friendly URL's? When I change the drop down I get a domian.com/?cat=285 instead of what it should be.
|
All times are GMT -8. The time now is 07:05 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.