I do a similar thing as to what Blair suggests (btw Blair, is stParam,  
(no "s")).  However, I don't suggest talking directly to the arguments  
scope from within a webskin file (reasons for which I hope are  
obvious :) ).

I've been meaning to add a feature request to the bug tracker (a  
simple one) where getView() methods will also return stObj.stParam.   
This is a simple implementation by just adding the line <cfset  
stObj.stParam = arguments.stParam /> before including the webskin  
within the getView() method.

In the meantime, I have a workaround that you can use.  It's a bit  
nasty though because you have to put this at the top of every webskin  
file that might use stParam.

<!--- Begin code --->
<cfparam name="arguments" default="#structNew()#" type="struct" />
<cfparam name="stParam" default="#structNew()#" type="struct" />
<cfif not structKeyExists(stObj, "stParam")>
   <cfset stObj.stParam = duplicate(arguments.stParam) />
</cfif>
<!--- End code --->

After that I declare any special variables that might exist from the  
stParam structure:
<cfparam name="stObj.stParam.myVar" default="" />

Hope that helps,

--
Jeff Coughlin
Web Application Developer
http://jeffcoughlin.com


On Nov 20, 2007, at 5:45 PM, Blair McKenzie wrote:

> Depends on where you're using the teaser. But in general you can do  
> this by passing extra variables into a template with the stParams  
> struct argument on the skin:view tag or the getView function. From  
> within the teaser you can access these variables via  
> arguments.stParams.
>
> Blair
>
> On Nov 21, 2007 5:16 AM, tilespace wrote:
>
> Hello... Me again :)
> Has anyone been able to do alternate row colors for custom types using
> teaser pages?
>
> From what I can tell, the rule calls the teaser page for every item in
> the DB so it's just getting one row at a time. I'm not going to be
> able to determine what that row color should be since they're not
> called at once, correct? Is there some way, or some hidden FC feature
> that I don't know about, to do this?
>
> Does that make sense what I'm trying to do?






--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"farcry-dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/farcry-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to