Webskin Templates
Overview
FarCry allows you to nominate whatever naming structure you like for templates. However, there is a special convention for FarCry template naming that can help you avoid unnecessary coding and configuration. Just follow the default naming standards for templates and you'll find a lot of things just fall into place.
Webskins for Content Items
Webskins are views for the content types in your system and should be located in your project's ./webskin/typename folder, where typename is replaced with the exact name (ie. case sensitive) of the relevant content type. For example, a template called displayPageStandard.cfm for a dmNews content type would be located at ./webskin/dmNews/displayPageStandard.cfm
Front End Views
Name |
Purpose |
Security |
---|---|---|
display* |
"display" is the prefix for any template that will be shown in the presentation tier. |
Anonymous users can view. |
displayPage* |
"displayPage" is the prefix for templates that display a full page, ie. typically incorporating HTML/HEAD/BODY elements. |
 |
displayPageStandard.cfm |
The default full page view. In the absence of any additional information, the framework will attempt to render this view. |
 |
displayTeaser* |
"displayTeaser" is the prefix for templates that show a teaser view or excerpt for a content item. Often these are referenced by publishing rules or in listings of content items. |
 |
displayTeaserStandard.cfm |
Standard name for teaser, although the framework does nothing special with this template. All content types should have a view of this name as it makes life easier when you have to display list views. |
 |
displayBody.cfm |
Advanced Option: The innards of a page. This webskin is used to populate the BODY element of a standard HTML view. |
 |
Administrative Views
Name |
Purpose |
Security |
---|---|---|
edit* |
 |
Secured to roles with access edit permmissions for the content type. |
edit.cfm |
Default edit handler. In the absence of any instructions, the framework will look for this template to render an editing interface. Note, if edit.cfm is absent the framework will dynamically assemble an edit handler based on the component metadata using the formtools subsystem. |
 |
List Views
A list view is simply a view on a content type, without any specific reference to an individual content item or database record. They are created and stored in the same location as standard webskins for content items.
Name |
Purpose |
Security |
---|---|---|
displayType* |
"displayType" is the prefix for templates that render a list of content items. |
Anonymous users can view. |
 |
 |
 |
Generic Views
Generic views are dynamically inherited by all content types that extend the abstract classes to which they are attached. For example all content types extend the "types.cfc" abstract class – its what defines the component as a content type. That is, any view (including both standard and list wwebskins) located in the ./webskin/types folder is automatically associated with a content type.
Overriding Views
Don't forget that if you place a webskin of exactly the same name as the generic view into your content types webskin folder it will always override the generic view. Generic views are a "fall back" view – in the absence of a specific view, the framework will look for a generic view that might apply.
Name |
Purpose |
Security |
---|---|---|
displayPageStandard.cfm |
Its very common to nominate a series of full page layouts as generic webskins, as page layout is often shared across multiple content types. Typically the generic displayPageStandard.cfm embeds the displayBody.cfm view. |
 |
displayHeaderStandard.cfm |
Its common to have a header template that is shared across many views. Placing it in ./types makes it automatically available to all content types. |
 |
displayFooterStandard.cfm |
The Footer equivalent of displayHeaderStandard.cfm. |
 |