> > For rather odd reasons I am attempting to pass a parameter
> > that looks a little like this:
> >
> > <cfparam name="variables.hpimage" default="<ui:hpimage
> > image='Dr_Andes_final.jpg' width='204' hieght='238'
> > alt='Dr. Jon M. Andes and friends' caption='yes'>">
> >
> > and call it like:
> >
> > <cfoutput>#variables.hpimage#</cfoutput>
> >
> > Which gives me...nothing? When I try to call it:
> >
> > <cfoutput>#evaluate(variables.hpimage)#</cfoutput>
> >
> > I get the error:
> >
> > The CFML compiler was processing:
> >
> > < marks the beginning of a ColdFusion tag.Did you mean
> > LT or LTE?
> >
> > Is there a way to do this? I know it seems rather odd to
> > pass a tag as a
> >
> > parameter but....
>
> It's not the browser that interprets that parameter string,
> but rather the CFMX server. This bit of syntax...
>
> <ui:hpimage
> image='Dr_Andes_final.jpg' width='204' hieght='238'
> alt='Dr. Jon M. Andes and friends' caption='yes'>
>
> ..on it's own calls a custom tag (hpimage.cfm) that writes
> some rather extensive code to the page. I was trying to
> find a way to pass it as one parameter to a page instead
> of as five parameters (without a db call).
In general, you can't use a tag as an attribute value for another tag. You
could get where you're trying to go like this, I suppose:
<cfsavecontent variable="myimage">
<ui:hpimage ...>
</cfsavecontent>
<cfparam name="Variables.hpimage" default="#Variables.myimage#">
Of course, this would run the custom tag ui:hpimage whether you needed to
use it or not. You might want to look for an alternative approach. Is this
custom tag written in CFMX, or is it a JSP custom tag? If it's written in
CFMX, you might find the component model to be more suitable for what you're
trying to do (or you may not, actually).
Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription:
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Your ad could be here. Monies from ads go to support these lists and provide more
resources for the community. http://www.fusionauthority.com/ads.cfm