Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Toggle dropdown box


Go to End


2 Posts   1213 Views

Avatar
michael_geeky

Community Member, 10 Posts

17 May 2013 at 6:55pm

Hi all,

I am new to SS. I have utilised the existing blog module to manage the blogposts on my site. However, I want to have a dropdown box on the BlogHolder page (list of blogs) where you can select blogs by category. I do not want to touch blog module as it's maintained by someone else, so I want to add another controller action that can be called via Ajax when dropdown box is toggled. So far I have only found extensions that I can add to add more fields to data models, but in this case I don't need to change structure of any blog pagetype. How should I add more controls to existing modules?

Cheers,
Michael

Avatar
copernican

Community Member, 189 Posts

18 May 2013 at 3:04am

Do you plan on using the already existing tag(s) field as categories or do you want to use a separate managed list of categories?

If its the latter you could try using a module I made: https://github.com/IOTI/silverstripe-blogcategories. It does not have a built it dropdown for selecting a category on the front end but you could build one yourself. If you don't want or have need of the module you could look at my code and see how i added extra controller actions to the blog holder i.e it uses

"yoursitelink.com/blog/category/category-name" for filtering blog posts by a selected category.