Ok, I solved it. Here is what I did. If anyone sees a better way, just let me know…

 

<cfinvoke

component="#Application.Content#"

method="GetContentNamesByCategory"

returnvariable="contentQuery"

category="Banner">

                       

<cfset REQUEST.RandomBanner = ListGetAt(ValueList(contentQuery.ContentItemID),RandRange(1, contentQuery.RecordCount))>

 

<cfoutput>

<div id="BodyHeader">

<cf_DisplayContent id="#REQUEST.RandomBanner#">

</div>

</cfoutput>

 

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]On Behalf Of Jim Canup
Sent: Tuesday, March 08, 2005 8:58 PM
To: Plum Discussion List
Subject: [plum] Content Question

 

In my Plum Application there is an area where the content should be randomly selected from all content in a specific category that is Published and within the publish dates.  I only want it to display one record (i.e., one bit of content).  Think of it like random banner ads. I have tried and tried and cannot get it to work.  It seems like it should be easy in Plum.  Any suggestions?

 

Jim

Reply via email to