Containers and Publishing Rules

Templates contain containers which contain publishing rules which in turn contain content items! Of course, a flowchart always helps...


FarCry has a special sub-system for managing dynamic content within the presentation layer.  Specific regions of any template can be designated as a "container" and have dynamic content scheduled into them by non-technical authors.  These features can also be known as portlets, page behaviours, pods, etc.

This concept is important to understand because it represents some of the most powerful aspects of the FarCry framework.  Containers are regions of a page where some sort of programmatic behaviour can be placed.  For example, a list of the latest news items, an event calendar, content to be syndicated via XML from another website, a randomly picked fact and so on.  These programmatic behaviours in FarCry are called Publishing Rules.

Containers

Containers are placed in a template by a website developer.  They should already be in place before you come to adding content on your site.

Containers can be unique to a specific page, shared across a specific section of the website or shared globally throughout the website.  They are populated by contributors selecting from a predefined set of publishing rules.

Walkthrough: Design Mode

To access containers we need to turn on "design mode".

  • Make sure you are logged into the FarCry webtop
  • Click on the View site link in the top right hand corner of the webtop; this should open up a browser with a view of the main website
  • When you are logged into FarCry as a contributor you should see the floating menu widget (or "floater") in the top left hand corner of the screen

     

  • Right mouse click to activate the menu
  • Select "design mode"

 

  • You'll notice the page reload and container widgets should be visible on the page

 

Publishing Rules

Publishing rules are special content types that are set up to dynamically display content based on some predefined behaviour.  FarCry ships with a library of publishing rules for contributors to choose from.  Developers can customise these rules or build their own. For example:

  • The "news" rule allows a contributor to select a type of display, categories for filtering and the number of news items.  When a visitor accesses the page with this rule, the predefined rule grabs the very latest news items matching the specified categorisation and displays them with the selected template.  When news content is added to the system, this rule will automatically update the page without any further intervention.
  • The "child links" rule will display teasers from all a pages underlying child pages.  This sort of behaviour is used to populate a summary or landing page dynamically based on the underlying pages of that section of the website.  Add, update or remove a page and the landing page is automatically updated.
  • The "random fact" rule will randomly pick and display a predefined number of fact content objects.  This rule would update and refresh its content every page request.  This is often used as a great way to show off testimonials or other snippets of information.

Walkthrough: Publishing News Content

Open the container editor for a page and schedule a News rule onto the page.

  • Browse to a page within your section of the web site
  • Change the view to design mode
  • Click on the container widget to open the container management area
  • Select the News Rule from the list and click "Move to Active Rules"
  • Click on the button, "Commit Changes" to commit the changes

   

  • Change the display teaser and restrict the output by category to highlight news rule features.