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're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Customising the CMS /

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

Adding Categories Tab to CMS (recipes:many_many-example )

Go to End

3 Posts   2288 Views


Community Member, 5 Posts

22 April 2010 at 10:13am

Hello. I am using SilverStripe to build a news Web site for a high school journalism class. I am well versed in basic html and CSS and have received an aerial-level introduction to object oriented programming and php but otherwise am brand new to CMS development.

I am following along with the many_many tutorial in the documentation, which covers how to add checkboxes to a tab in the CMS so that users can assign articles to categories.

I got the new tab to appear but it's not obvious to me precisely where/how I define the categories I want. (For example, News, Sports and Opinion would be a few of them.) I'm guessing this would happen when the TableField is created in ArticleHolder.php?

Could someone point me in the right direction?



Community Member, 5 Posts

26 April 2010 at 8:51am

OK. For now, in "Article.php", I just defined the $categoryList variable manually as an array listing the checkbox names I wanted. Probably not ideal, I know, but this is enabling me to move forward.


Community Member, 21 Posts

5 July 2010 at 9:35am

Hey need to create an ArticleHolder page in your CMS first, and then inside of that (in the CMS) you may create the categories which will subsequently appear as checkbox items in each Article page. The Category creator function is not the most intuitive (Where do you click to enter the Category title? When does one click + Add Category (before or after typing in the title?, etc.).

Hope this helps,