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.
How can I create search Dropdown list from Categories in News Module
Re: How can I create search Dropdown list from Categories in News Module
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"
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"
Last edited by jmcgin51 on Mon Oct 12, 2009 5:42 pm, edited 1 time in total.
-
- Support Guru
- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
- Location: Fernie British Columbia, Canada
Re: How can I create search Dropdown list from Categories in News Module
create a new browsecat template that builds a form, and a dropdown.... use javascript/jquery to handle the action. it's quite simple.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Re: How can I create search Dropdown list from Categories in News Module
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!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.
Re: How can I create search Dropdown list from Categories in News Module
as I said

Thanks, Calguy.
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
@jmcgin51, did you have any luck with this?
Re: How can I create search Dropdown list from Categories in News Module
Have you googled it?...
Is how I found out how to make a drop down select from menu manager...
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
@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
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
-
- Forum Members
- Posts: 92
- Joined: Mon May 14, 2007 11:31 am
Re: How can I create search Dropdown list from Categories in
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.
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.