Code By Example

Overview

Code examples of functionality that can be created in FarCry. We're focused on sample code here so in many instances there is little explanation beyond the code comments.

Code Samples
  • Basic search form for dmNews — This is a basic search form which enables you to place a search option for dmNews, you can build it further as required.
  • CAS + LDAP Unique Example — Here is a small example for creating your own User Directory that might be interfacing with some unique situations. Here there is a combined CAS for login + LDAP for group identification.
  • Flush ColdFusion trusted cache from Farcry Webtop — You can improve (production) performance by turning on trusted cache for your ColdFusion server. However, it's easy to forget that trusted cache is on when you do an update. Here is how to add this functionality to the FarCry Webtop so you can flush cache when you re-initialise the application.
  • ftWatch Example — Here is a quick primer on how to use ftWatch in a formtool. Basically, two things get passed into the functions of a formtool (such as edit() or display())
  • Link Array Formtool — Ever wanted to allow users to capture a bunch of links in a property that you can output? You could always use the FarCry CMS Link content type, but its a bit unwieldy, especially if your links are really only related to one specific content item and don't make sense in a library. Well you are in luck
  • Sample iTunes Feed — Building an iTunes feed is relatively straightforward in ColdFusion. The trick in FarCry Framework is knowing where to put the code. This example is taken directly from the webDU Developer Conference website.
  • Sample RSS Feed — Building an RSS feed is very straightforward in ColdFusion. The trick in FarCry Framework is knowing where to put the code. This example is taken directly from the Fullasagoog website.
  • Simple polling — This rule provides a very simple widget that can be added to any container, presenting users with a question and list of options then displaying the results after they choose.