Versions Compared

Key

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

...

  1. Open the ./packages/superHero.cfc
  2. Add Wizard Steps using the ftWizardStep formtool metadata
    Code Block
    <!--- ./packages/types/superHero.cfc --->
    <cfcomponent name="superHero" extends="farcry.core.packages.types.types" output="false" displayname="Super Hero">
    
    	<cfproperty
    		name="title" type="string" default="" hint="Super hero title."
    		ftSeq="1" ftFieldset="General Details" ftWizardStep="Teaser Information" ftLabel="Title" ftValidation="required" />
    	<cfproperty
    		name="secretHideout" type="string" hint="The secret hideout location of the super hero"
    		ftSeq="2" ftFieldset="General Details" ftWizardStep="Teaser Information" ftLabel="Secret Hideout" />
    	<cfproperty
    		name="teaser" type="longchar" default="" hint="Mini intro for super hero biography."
    		ftSeq="3" ftFieldset="General Details" ftWizardStep="Teaser Information" ftLabel="Teaser" />
    	<cfproperty
    		name="biography" type="longchar" default="" hint="Super hero biography."
    		ftSeq="4" ftFieldset="General Details" ftWizardStep="Biography Details" ftLabel="Biography"
    		ftType="richtext" />
    	<cfproperty
    		name="imgHero" type="string" hint="The source image to upload"
    		ftSeq="10" ftFieldset="Imagery" ftWizardStep="Imagery" ftLabel="Hero Image"
    		ftType="image" ftDestination="/images/superHero/imgHero" ftImageWidth="120" ftImageHeight="120" ftAutoGenerateType="fitInsidecenter" />
    
    </cfcomponent>
    
  3. Make sure that each <cfproperty> has a relevant ftWizardStep entry
  4. Reload the formtool metadata and test that your wizard works.

...

  1. Create a new ColdFusion component called ./packages/types/SuperPower.cfc
  2. Create the following properties
    • title (string; required... think ftValidation="required")
    • description (longchar; try limiting the total characters to 512)
    • imgPower (image; 100x100 dimensions, destination: /images/superPower/imgPower)
  3. Deploy the content type into the database
  4. Use the Scaffold tool in the COAPI area to create an administration page
  5. Add a bunch of super powers to your application (ColdFusion, Flex, Flash, Photoshop, etc. ) You will find some content for powers in your media folder

Bonus Lab: Image Sourced from Library

You can easily source images from the global image library. If you have some time on your hands, try implementing the an image sourced from the library with custom crops for your local content item.

Code Block
titleSample Code from ./myproject/packages/dmCarouselItem.cfc

<cfproperty name="imageSourceID" type="string"
	ftSeq="2" ftFieldset="General Details" ftLabel="Source Image"
	ftType="uuid" ftJoin="dmImage"
	ftHint="Select an image from the image library or create a new image.">

<cfproperty name="imageCarousel" type="string"
	ftSeq="3" ftFieldset="General Details" ftLabel="Carousel Image"
	ftType="image" ftDestination="/images/dmCarouselItem/imageCarousel"
	ftAllowUpload="false" ftSourceField="imageSourceID:SourceImage"
	ftAutoGenerateType="center" ftImageWidth="620" ftImageHeight="200"
	ftQuality="0.8" ftInterpolation="blackman">
		
<cfproperty name="imageThumbnail" type="string"
	ftSeq="4" ftFieldset="General Details" ftLabel="Thumbnail Image"
	ftType="image" ftDestination="/images/dmCarouselItem/imageThumbnail"
	ftAllowUpload="false" ftSourceField="imageSourceID:SourceImage"
	ftAutoGenerateType="center" ftImageWidth="95" ftImageHeight="30"
	ftQuality="0.8" ftInterpolation="blackman"
	ftHint="">