[ic] Variable flypages

Mike Heins mikeh@minivend.com
Thu, 5 Oct 2000 14:28:24 -0400


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.

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

The U.S. Senate -- white male millionaires working for YOU!  -- Dave Barry