[contentbox-version] News and Event pages and listing


I would suggest please read contentbox docuemenation for creating different type of contents



Yes i want to create different type of content like blog. i want create line news and events which would have addition meta data like few filter types and event start and end dates. So i was thinking of extending it to have another content menu like News and Events. Is it possible to do it without breaking the application upgrades?


You can use custom fields to add data or better create a module to handle your new content type.

This will not break future updates.

Ideally i would like extend content model like blog with more meta data. if i do that and develop is that would break ContentBox upgrade? thats what i am concern about changing the core. is it possible to extent the content model from different module?


As Francesco stated, look at custom fields.

You should develop a custom module with a Events model that extend BaseContent of contentbox. This way yopu will not break future upgrade.

I don’t know if there are modules on forgebox with example on how to build custom content type. Probably Brad can give you more suuggestions on right approach.


There are two ways to approach this:

  1. Custom Fields

You can create custom metadata for any content object and use it appropriately in your theme. This is the easiest way that requires basically no programming.

  1. Custom Content Objects
    This is the most flexible approach as it allows you to tap into our object model and create content objects according to your requirements. This is done in a few steps.
  1. Create a ContentBox module that will register menu contributions, security and of course your models
  2. Your models (ex. News, Calendar), need to extend “contentbox.models.content.BaseContent”. You can find the API here: http://apidocs.ortussolutions.com/contentbox/3.0.0-rc/contentbox/models/content/BaseContent.html

Just by extending you get lots of content functionality. You can then build your own listing, editors based on our source code:

  1. Handler Code: https://github.com/Ortus-Solutions/ContentBox/blob/development/modules/contentbox-admin/handlers/entries.cfc
  2. View Code: https://github.com/Ortus-Solutions/ContentBox/tree/development/modules/contentbox-admin/views/entries

This approach is also future proof. The modular approach is the way to go, this way they are future proof on upgrades.

Thanks Luis i really like the module approach which give me more flexibility i will try that.


No problem.

Your module code should be almost identical as the entries pages or content store code in ContentBox. So you have a good base to use an example.

We are here to help so any question please ask away

Luis Majano
Ortus Solutions, Corp
P/F: 1-888-557-8057

Hi Luis,

Separate module worked great on the admin side. now my question is that what would be the best way implement for public facing site?

Thanks for your help


Hi Siddiq

Same thing. Your module has an entry point which registers globally so you can create a unique entry point for your ui. You can then use the cbhelpers prepareuirequest method so that your views render in the cms theme selected.

You can also just create pages traditionally and render out your content as view lets by using the view let widget.