Doug, you are DA MAN! Thanks a lot. (All of the template code will
eventually end up in that tutorial I keep trying to finish, eventually,
on my blog.)
Cutter
Doug Boude (rhymes with 'loud') wrote:
> Hey Cutter. Initially it threw me an error, but only because
> variables.standardSideNav didn't exist. I added a cfparam just above the
> cfscript to set the missing variable to a boolean value, and it worked with
> your code snippet in place, no errors. here's the actual code I tested, fyi:
>
> <cfparam name="variables.standardsidenav" default="false">
>
> <cfscript>
> if (not isdefined("variables.headerImages")){
> variables.headerImages = arraynew(1);
> }
> if (not arraylen(variables.headerImages)){
> variables.img = structnew();
> if (not variables.standardSideNav){
> variables.img.filename = "myimage.jpg";
> variables.img.alt = "My Image";
> variables.img.width = "206";
> variables.img.height = "173";
>
> arrayappend(variables.headerImages,structcopy(variables.img));
> }
> variables.img.filename = "myimage_2.jpg";
> variables.img.alt = "My Second Image";
> variables.img.width = "407";
> variables.img.height = "173";
>
> arrayappend(variables.headerImages,structcopy(variables.img));
> }
> </cfscript>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four
times a year.
http://www.fusionauthority.com/quarterly
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:252625
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4