Theme option: selecting a category?
Posted: Fri Feb 08, 2008 4:03 pm
This is something for our PHP wizards (Garvin? Anyone?) to chew on.
Here's what I'd like to do: Users are supposed to select a particular category in the theme options. Some entries from that selected category will then be displayed in a particular part of the content area.
(I have the smarty part for that already down, so this is all about how to do it in config.inc.php, I guess.)
Here's how I'd like to do it: Users get a dropdown box in the theme options listing all names of categories available in the blog. They select a particular category, and the dropdown box/function returns that category's id to use in a .tpl file.
(I can take it from there myself, I think. I "only" need some way to translate a category name into an id. Of course I could make users enter the desired category's id in an input field in the theme options, but this would be much more user-friendly.)
Is is possible, and if so: how?
Thanks in advance,
YL
Here's what I'd like to do: Users are supposed to select a particular category in the theme options. Some entries from that selected category will then be displayed in a particular part of the content area.
(I have the smarty part for that already down, so this is all about how to do it in config.inc.php, I guess.)
Here's how I'd like to do it: Users get a dropdown box in the theme options listing all names of categories available in the blog. They select a particular category, and the dropdown box/function returns that category's id to use in a .tpl file.
(I can take it from there myself, I think. I "only" need some way to translate a category name into an id. Of course I could make users enter the desired category's id in an input field in the theme options, but this would be much more user-friendly.)
Is is possible, and if so: how?
Thanks in advance,
YL