O'Reilly logo

Adobe ColdFusion 8 Web Application Construction Kit, Volume 1: Getting Started by Charlie Arehart, Raymond Camden, Ben Forta

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Displaying Individual Items

Listing 22.1 creates a CFML Custom Tag called <cf_MerchDisplay>. The tag displays a single piece of merchandise for sale, including a picture of the item and the appropriate Add To Cart link. You can use this to display a series of items in Orange Whip Studios’ storefront page, as well as to feature individual items as callouts on the home page and throughout the site.

After you have this tag is in place, you can use it like this (where someMerchID is the name of a variable that identifies the desired item from the Merchandise table):

<!--- Show item for sale, via custom tag --->
<cf_MerchDisplay
 merchID="#someMerchID#"
 showAddLink="Yes">

This Custom Tag is similar conceptually to the <cf_ShowMovieCallout> Custom ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required