Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
title./webskins/bslPromoTile/displayTeaserVertical.cfm
<cfsetting enablecfoutputonly="true" />
<!--------------------------------------------------------------------
bslPromoTile: displayTeaserVertical.cfm
--------------------------------------------------------------------->
<!--- @@displayname: Vertical Image Tile --->
<!--- @@author: Geoff Bowers (modius@daemon.com.au) --->
<!--- @@description: Vertical promotional tile image; typically used in side bar.  --->

<!--- import tag libraries --->
<cfimport prefix="skin" taglib="/farcry/core/tags/webskin" />
<cfimport prefix="ft" taglib="/farcry/core/tags/formtools" />

<ft:object stobject="#stobj#" format="display" r_stfields="stfields" />

<cfoutput><div class="promo vertical"></cfoutput>

<cfif len(stobj.linkNavigation)>
  <skin:buildlink objectid="#stobj.linkNavigation#">
    <cfoutput>#stfields.imgVertical.html#</cfoutput>
  </skin:buildlink>
<cfelse>
	<cfoutput><a href="#stobj.linkExternal#">#stfields.imgVertical.html#</a></cfoutput>
</cfif>

<cfoutput></div></cfoutput>

<cfsetting enablecfoutputonly="false" />

Extending Hand-Picked Rule

There is a useful publishing rule available in the FarCry CM Plugin called "Hand Picked Rule". This allows you to hand-pick a specific content type for inclusion on a page using a specific teaser display. However, the hand-picked rule needs to be told which content types are eligible to be picked. As your bslPromoTile content type is brand-new you'll need to override the default list of content types and add your own.

You can override the behaviour of an existing rule in the core code base or any plugin by referencing and extending the rule from within your project code base.

Code Block
title./projects/myproject/packages/rules/ruleHandPicked.cfc

<cfcomponent displayname="Utility: Handpicked Rule" extends="farcry.plugins.farcrycms.packages.rules.rulehandpicked" 
	hint="Hand-pick and display individual content items with a specified displayTeaser* handler.">
<cfproperty ftSeq="2" ftFieldSet="Selected Objects" name="aObjects" type="array" ftJoin="dmEvent,dmFacts,dmFlash,dmFile,dmImage,dmInclude,dmLink,dmNews,dmHTML,bslPromoTile" ftLabel="Select Objects" />
</cfcomponent>
Tip

Note that you only need to specify the specific properties that you want to override.