[ic] form in area tag, good except

Ron Phipps interchange-users@interchange.redhat.com
Fri Jun 7 02:35:01 2002


> From: interchange-users-admin@interchange.redhat.com
[mailto:interchange-
> users-admin@interchange.redhat.com] On Behalf Of Paul Jordan
> 
> > > I am trying to get a variable to toggle based on user click.
> > This variable
> > > is on every page of the site.
> > >
> > >
> > > I have
> > >
> > [snip old]
> > > This works fine on every page tested so far except a flypage.
> Basically,
> > > "smode" can be toggled to sim => simple mode or adv => advanced
mode.
> > >
> >
> > Try:
> >
> > [set searchset]
> >  [seti smode][cgi smode][/seti]
> > [/set]
> >
> >  [calc]
> > 	$Scratch->{page_arg} = q{[item-code]};
> > 	if ($Scratch->{page_arg} =~ /^\[item-/) {
> > 		$Scratch->{page_arg} = q{@@MV_PAGE@@};
> > 	}
> > 	return;
> >  [/calc]
> >
> > <br>
> >  <A HREF="[area
> > 			href="[scratch page_arg]"
> > 			form="
> > 				mv_click=searchset
> > 				mv_action=return
> > 				smode=adv
> > 			"
> > 	  ]">switch to advanced mode</a>
> >
> > <br>
> >  <A HREF="[area
> > 			href="[scratch page_arg]"
> > 	        form="
> > 				mv_click=searchset
> > 				mv_action=return
> > 			"
> > 	  ]">switch to basic mode</a>
> > <br>
> > <br>
> >
> >   scratch smode=[scratch smode]
> >   <br>
> >   cgi smode=[cgi smode]
> >
> > --
> > Mike Heins
> 
> After review and testing of this, I have come to the conclusion that I
may
> have left out information. The above code works fine on all accounts,
> except
> for the flypage...still.
> 
> >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.
> 


Try doing this:

Move: [fly-list code="[data session arg]"] to the very top of your
flypage.html (make sure you move it, not copy).

Below that do a:

[tmp current-sku][item-code][/tmp]

In your included top template you can get a hold of the product being
viewed in the variable: [scratch current-sku], use it as you see fit.  I
do this very thing when I need to pass the sku being viewed to control
components.

Good luck!
-Ron