I would pass a list as a parameter and 
make the whole stuff inside the custom tag code
Mario
--- Justin Scott <[EMAIL PROTECTED]> escribi�: > > I
have a custom tag that I want to add some <CFIF
> statements but I'm not
> > sure if this can be done.
> > Has anyone had experience doing this before?
> >
> > I'm passing the username, fullname and password
> from input boxes and the
> > password items with checkboxes
> > to my template.
> 
> The syntax you're suggesting is not valid and will
> not work.  When you call
> a custom tag, the actual number of attributes and
> attribute names being
> passed to it are static in the code.
> 
> Your options are:
> 
> 
> 1. Use IIF() within the attribute values to
> determine the value to be
> passed, such as:
> 
>    MustChangePassword="#iif(FORM.select IS "mcp",
> de('yes'), de('no'))#"
> 
> Using IIF() should be avoided whenever possible
> because it's slow, difficult
> for many developers to grasp and just plain evil. 
> Not to mention your
> nested CFIF statements will need to be integrated
> into each of the IIF()
> calls.  Very messy.  Please don't do this.
> 
> 
> 2. Use a block of code (CFIF's, CFPARAM's, whatever
> you need) to determine
> the value of all of the variables in advance and
> pass them to the call to
> the custom tag.  This is probably your best bet.
> 
> 
> 3. If the tag has mutually exclusive attributes, you
> can run your CFIF block
> and call the custom tag with the required attributes
> and values at each
> level of the nest.  This would be the most flexible,
> but you'll end up
> repeating a lot of code.
> 
> 
> Hopefully that will shine a little bit of light on
> it..
> 
> -Justin Scott, Lead Developer
>  Sceiron Internet Services, Inc.
>  http://www.sceiron.com
> 
> 
>

______________________________________________________________________
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to