4images Forum & Community
4images Issues / Ausgaben => Discussion & Troubleshooting => Topic started by: Pedrocas on February 02, 2009, 07:34:58 PM
-
Hi,
I wonder if there's a way of create dropdown lists for unique categories.
I mean I know I can use the {category_dropdown} that will show me all the categories I have, but I would like to create dropdown lists for specific categories (with only one).
Is this possible to be done?
Thanks in advance for the help...
P.S: I'm using 1.7.6 version
-
but I would like to create dropdown lists for specific categories (with only one).
I didn't understand that part...exactly what do you want?
-
Thanks for your reply.
Instead of showing all Categories in the dropdown list I need to show only one category (choosen by me).
-
Sorry to bump an old topic, but is it possible to use dropdown list in categories or not?
Thanks in advance for any help.
-
Wow, that is some patience you got there :D
In includes/page_header.php find:
$site_template->register_vars("category_dropdown_selfjump", $category_dropdown_selfjump);
Insert above :above::
$categories_list = array(1,18,14); //list of categories IDs
$cat_parent_cache_backup = $cat_parent_cache;
$cat_parent_cache = array($categories_list);
$site_template->register_vars("category_dropdown_selfjump", get_category_dropdown(0, 1));
$site_template->register_vars("category_dropdown_form_custom", str_replace("'jumpbox'", "'jumpbox_custom'", str_replace('"jumpbox"', '"jumpbox_custom"', $site_template->parse_template("category_dropdown_form"))));
$cat_parent_cache = $cat_parent_cache_backup;
unset($categories_list, $cat_parent_cache_backup);
replace 1,18,14 with your own list of category IDs
In templates use {category_dropdown_form_custom}