Overview of included objects

Included objects are an easy way to quickly add custom functionality to Farcry without having to create Custom Types or display rules. Essentially included objects are self-contained CFM pages that, once added in Farcry, will be included within the standard site skin. Of course, building an include does required enough knowledge of ColdFusion to build whatever functionality you need from scratch.

Creating included objects

When you develop an included object, you can develop it exactly as you would any other ColdFusion page, using either the Farcry datasource or another datasource as needed.

Some tips to keep in mind when designing includes

Example included object structure

Let's say you are creating a Contact Form for an included object. This is a self-posting form with a "form" view, and a "confirmation" view. It is inserted into a database by a CFC, and the information from it is emailed to your email address.

Here are the files you would need:

Making included objects available to Farcry

To be available in Farcry, the include needs to be placed in the farcry_<application name>/includedObj directory. The include must be directly within this folder so that Farcry can find it.

Using included objects in Farcry

  1. Once the file is in the proper place, simply log in to Farcry admin and go to the Site tab.
  2. Within your site tree, select the navigation node where you want the include to appear, and create a new include object (right-click and choose Create > Include from the context menu).
  3. In the Create Include form you will see a select menu that shows all the files in the includedObj folder. Select your include file from the list.
  4. Give the include object a title, teaser and select a Display Method for it. Send it live or preview as desired.

note: at this point it often helps to turn on debugging in CF Admin or append "debug=1" to the URL of the page to work out any errors!

If this is your first include you will also notice that it may not match the rest of your webskin. Under the /webskin/ folder, there is a folder for Included Object display methods. This folder by default is called dmInclude. These skins are what will determine the display of your include, customize as needed.
The most important line in the skin is where the include itself is called:

<cfinclude template="/farcry/#application.applicationname#/includedObj/#stObj.include#">

As long as this line is in your display method, your include should show up.

Include tips and ideas