Filtering content in Mura CMS
In my ongoing adventures w/ Mura ColdFusion CMS , I have been setting up a calendar of events for a local tourism website. A 'calendar' is a built in content type in Mura, with many options for showing and filtering the content.
For this calendar, we want our events to show up as soon as they are entered, remain on the site until 2 days after the event date has passed , and then be removed from view. So, we need a filter that compares the current date to a date two days in the future - easy with ColdFusion's dateAdd() function, but the trick was getting that function into the Mura "filter" settings.
Here's how I set it up:
1) create the calendar
- in site manager, click the "+" next to home page (or wherever) and choose 'add calendar'
- give your calendar a title, and click 'publish' (other details can be added as desired)
2) create the "content collection" to show the calendar's info
- click 'content collections' , then select 'add new Local Index'
- give it a name
- next to the heading "Choose content from section:", click the (less than obvious) "[select section]" link , and type in part of the name of your calendar to search for that content**
- in the search results, click the "+" on the far right to add your calendar, making sure "include features only" is set to "no"
** this has been one of the key Mura admin concepts I've had to adjust to - this type of content search is used a lot in the admin, rather than dropdowns or other standard ways of presenting existing selections. It works well once you get used to it.
3) set up the filtering
- on the "advanced filters" tab, add two filters, with the following selections:
i) Start Date / Time : Greater Than or Equal To : [mura]dateAdd('d',2,now())[/mura]
ii) Or : Stop Date / Time : Greater Than or Equal To : [mura]dateAdd('d',2,now())[/mura]
The key was the use of The Mura Tag , which allows you to use any standard CF functions in place of a static value ( documentation here ) - in this usage, we are comparing today's date to a date 2 days from now (if you wanted to be more specific you could add 48 hours instead of 2 days ... or anything you like )
As I am quickly learning, Mura contains a number of filtering options for its content collections. I'm interested in seeing your examples if you've got 'em!


I wonder if it requires that the "mura tag" to be enabled in the settings?