Kola Oyedeji spoke the following wise words on 21/04/2004 10:00 PM EST:
Hi I am just getting to grips with Farcry and would be grateful if
someone could explain to me the concepts of rules, objects and types (in
relation to Farcry). How do rules differ from dynamic content?

Also am I right in saying that a display method contains 1 or more
containers which can contain one or more rules.

Welcome!


Ok here's a quick rundown.

At the base Farcry has content types. These can be the base types, or custom types written by you. An instance of a custom type has an objectid.

For each content type you have a set of display templates. These can be found in the webskin folder. The base install of farcry has a few different templates for each content type.

There are two types of templates mainly used, teaser and page templates. Teaser templates are used in lists, side bars and all other secondary type stuff. Page templates are used to render the entire content object to the screen.

An instance of a custom type, or a 'content object', usually has a 'display method' associated with it. This is just the name of the template that should be used to render the object.

A template consists of html, cf and containers. Containers are just regions on the template specified using Farcry's special container tags.

'Rules', or 'publishing rules', are modules which populate content into containers. These are highly configurable, so for example you could configure your publishing rule to display a list of news (using a teaser display method) which meet a certain criteria. You can assign multiple rules to containers. Rules can, in theory, interact with one another -- but rarely they do.

A template's containers can either be static across all content objects that use that template, or specific to each content object. The 'name' of the container is used to specify this. If you want something to be specific to each content object you put a #stObj.objectid# at the start of the name, which will tie it down to that content object instance.

For example, a dmHTML display method (or template) might have two containers, 'bottom' and 'shared_bottom'. Using a publishing rule you can assign content to appear in these two containers. The publishing rule you assign to the 'shared_bottom' container will be shared amongst all the dmHTML object which use this template. The publishing rule you assign to 'bottom' will be specific to each individual dmHTML item.

The stObj structure is passed to a template by a type's 'display' method. The stObj contains all the data for that object instance, and can be used by the template to output the data.

Types can be set to either belong in the site tree (if they lend themselves to the hierarchical organisation that the tree provides) or can be created as 'content', which just means content which doesn't make sense to organise in the tree (for example dmNews items).

FourQ is used to store and restore content from and to CF structs. The COAPI keeps the content type definitions in sync with the DB tables.

HTH

-- tim

www.toolmantim.com


--- You are currently subscribed to farcry-dev as: [EMAIL PROTECTED] To unsubscribe send a blank email to [EMAIL PROTECTED]

MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia
http://www.mxdu.com/ + 24-25 February, 2004

Reply via email to