Page 1 of 1
How can I create search Dropdown list from Categories in News Module
Posted: Mon Oct 12, 2009 4:34 pm
by Loopy
Hi,
I've searched in the forums and while this seems to be almost answered in different places it doesn't quite explain how to do what I'm after. I want to create a dropdown list of categories from the News module that shows displays articles from select category. Does anybody have any ideas or maybe even done this before.
For example if I have a category named "Tutorials" any article in the Tutorials category will be display.
Hope somebody can help.
Thanks.
Re: How can I create search Dropdown list from Categories in News Module
Posted: Mon Oct 12, 2009 5:29 pm
by jmcgin51
I don't know if there is an "official" way to do it, but you could use the "browsecat" parameter for News, then capture the output of the module call, split it by spaces using Smarty, and populate the dropdown this way.
I'm sure there are much cleaner/faster ways, but if you need a solution ASAP, this should work. (UNTESTED)
In the future, perhaps the dev team will add a new parameter or argument, something like "action=dropdown"
Re: How can I create search Dropdown list from Categories in News Module
Posted: Mon Oct 12, 2009 6:49 pm
by calguy1000
create a new browsecat template that builds a form, and a dropdown.... use javascript/jquery to handle the action. it's quite simple.
Re: How can I create search Dropdown list from Categories in News Module
Posted: Mon Oct 12, 2009 6:56 pm
by Loopy
calguy1000 wrote:
create a new browsecat template that builds a form, and a dropdown.... use javascript/jquery to handle the action. it's quite simple.
Thanks for the replies and suggestions. My difficulty is I'm a complete novice to the code behind the code. I've used cmcms for a while and solved some basic problems I've met but for some reason this one is just getting away from me!
Re: How can I create search Dropdown list from Categories in News Module
Posted: Mon Oct 12, 2009 6:58 pm
by jmcgin51
as I said
jmcgin51 wrote:
I'm sure there are much cleaner/faster ways...
Thanks, Calguy.
Re: How can I create search Dropdown list from Categories in News Module
Posted: Sun Nov 08, 2009 6:07 pm
by Loopy
@jmcgin51, did you have any luck with this?
Re: How can I create search Dropdown list from Categories in News Module
Posted: Tue Nov 10, 2009 1:36 am
by Dr.CSS
Have you googled it?...
Is how I found out how to make a drop down select from menu manager...
Re: How can I create search Dropdown list from Categories in News Module
Posted: Wed Nov 11, 2009 4:37 pm
by Zoorlat
@Loopy
In case you are still looking, Calguy has posted a good tutorial on how to do this on his webiste:
http://calguy1000.com/Blogs/17/60/news-category-dropdown.html
Cheers
Re: How can I create search Dropdown list from Categories in
Posted: Thu Jan 26, 2012 11:30 am
by vzw klemtoon
i'd love to know how to dropdown this list of cats with jquery...
and how to style it in css..
it parses
<form method="get">
<select name="news_category">
<option value="-1">All</option>
<option value="1" >General</option>
<option value="2" >concerten</option>
</select>
<input type="submit" name="submit" value="Submit"/>
</form>
how can one add classes to this?
thnx in advance.