[ic] form in area tag, good except

Mike Heins interchange-users@interchange.redhat.com
Fri Jun 7 06:47:00 2002


Quoting Paul Jordan (paul@gishnetwork.com):
> >From what I can make out, the above [calc] would have to be inside the
> [flylist] to interpolate. My "switch to" buttons are [included] within the
> top template. I tried various things like substituting with
> 
> $Scratch->{page_arg} = q{[fly-list code="[data session
> arg]"][item-code][/fly-list]};
> 
> and
> 
> $Scratch->{page_arg} = q{[fly-list interpolate=1 code="[data session
> arg]"][item-code][/fly-list]};
> 
> 
> But no luck. This train of thought made me try other ways similar to this,
> but they all seem to revolve around being able to reference a fly-list
> [item-code], outside and before the fly-list itself.
> 
> Can someone shed some light on how I can get
> 
> [fly-list code="[data session arg]"][item-code][/fly-list]
> 
> or similar to interpolate in the top template.
> 

I would suggest this one-line global UserTag:

    UserTag flycode Routine sub { return $Vend::Flypart }

Then [flycode] will yield an empty string if it is not a flypage,
and the item code if it is. Change your calc to:

 [calc]
	$Scratch->{page_arg} = $Tag->flycode();
	unless ($Scratch->{page_arg}) {
		$Scratch->{page_arg} = q{@@MV_PAGE@@};
	}
	return;
 [/calc]

Then it should work anywhere on the page.

-- 
Mike Heins
Perusion -- Expert Interchange Consulting
phone +1.513.523.7621      <mike@perusion.com>

My wife is great.  She doesn't care where I go, just as long as I don't
have any fun.  -- Lee Trevino