[ic] Problems with getting scratch value into area tag

Jonathan Clark interchange-users@icdevgroup.org
Sun Mar 9 03:49:00 2003


> This is my problem.  I am trying to set a scratch variable in a page and
> get the value of this variable into a area tag.
>
> I'm setting some variables with
>
> Page 1
>
> [tmp bc_1_title]Locations[/tmp]
> [tmp bc_1_area]locations[/tmp]
>
>
> Page 2
>
> [tmp bc_1_title]Locations[/tmp]
> [tmp bc_1_area]locations[/tmp]
> [tmp bc_2_title]Blenheim[/tmp]
> [tmp bc_2_area]blenheim[/tmp]
>
>
> And in my template I have
>
>       <a href="[perl]
>       $Tag->area(  { href => scratch($bc_1_area)    }  );
>  		[/perl]" class="nav3_item"><b>[scratch
> bc_1_title]</b></a> &raquo;
>       [if scratch bc_2_title]
>         <a href="[perl]
>          $Tag->area(  { href => scratch($bc_2_area)    }  );
>  		  [/perl]" class="nav3_item"><b>[scratch
> bc_2_title]</b></a> &raquo;
>       [/if]

What is scratch()? This would be $Scratch->{$bc_1_area}.

>
> I also tried something like this with no luck.
>
>       <a href="[area scratch bc_1_area]" class="nav3_item"><b>[scratch
> bc_1_title]</b></a> &raquo;
>       [if scratch bc_2_title]
>         <a href="[area scratch bc_2_area]" class="nav3_item"><b>[scratch
> bc_2_title]</b></a> &raquo;
>       [/if]
>
>
> Could someone please advise me the correct my I can get the value of a
> vaiable into a [area] tag

You need to use positional parameters and the [scratch] tag. You can't just
make up your own syntax.

[area href="[scratch bc_2_area]"]

Jonathan.