[ic] Variable flypages

Mike Heins mikeh@minivend.com
Thu, 5 Oct 2000 18:15:52 -0400


Quoting Stefan Hornburg (racke@linuxia.de):
> Mike Heins <mikeh@minivend.com> writes:
> 
> > Quoting Stefan Hornburg (racke@linuxia.de):
> > > "Jeff Case" <jeff_case@hotmail.com> writes:
> > > 
> > > > How do I allow a database field to determine which flypage is used?
> > > 
> > > I think it is not possible with IC yet. But the following modification
> > > should suffice:
> > > 
> > > --- interchange/lib/Vend/Page.pm	Wed Aug 23 10:11:29 2000
> > > +++ invendor/lib/Vend/Page.pm	Thu Aug 24 09:37:36 2000
> > > @@ -90,7 +90,7 @@
> > >  		
> > >  	# Try for on-the-fly if not there
> > >  	if(! defined $page) {
> > > -		$page = Vend::Interpolate::fly_page($name);
> > > +		$page = Vend::Interpolate::fly_page($name, undef, readin($Vend::Session->{arg}));
> > >  	}
> > >  
> > >      if (defined $page) {
> > > 
> > > 
> > > Then you can choose the flypage as follows
> > > 
> > > [page href="[item-code]" arg="[item-field flypage]"]FLYTEST</a>
> > > 
> > 
> > You can do that right now with the PageSelectField directive, which
> > falls back to "flypage" if empty.
> 
> This is a fine idea, but I needed this approach for another situation
> (links from outside and from inside displaying different pages).
> 

Then just surround the flypage with

    [fly-list arg="[data session arg]"]
	Normal flypage stuff
    [/fly-list]

and do:

	[page href=flypage arg="sku"]

or 

	[page href=flypage_other arg="sku"]


The fly-list picks up its SKU from the URL if there is no arg supplied.

-- 
Akopia, Inc., 131 Willow Lane, Floor 2, Oxford, OH  45056
phone +1.513.523.7621 fax 7501 <heins@akopia.com>

Function in chaos, finish in style. -- Unknown