[ic] Multiple product layout on flypage.html
paul at gishnetwork.com
Tue Apr 26 23:17:31 EDT 2005
Kevin Walsh wrote:
> Andre Bunting [andreb at techess.com] wrote:
>> I was wondering .. in my case I have clocks and watches..
>> now on the flypage.html.. I was wondering if I can have an if
>> statement to tell the flypage which layout to show, either the layout
>> for clocks or the layout for watches..
>> [snip: example code]
>> Is the approve possible ? if so how to do it.. secondly .. what would
>> I have to do so that in the admin section I would have two sets of
>> input screens.. one for clocks.. others for watches ?
> You could code two completely different layouts into one
> flypage.html but what would happen, in the future, when you
> decide that you want three types of layout (perhaps a new one
> for grandfather clocks)? The code could become very
> difficult to maintain after a while.
> A cleaner solution be to use a different flypage for each product
> type. See the "PageSelectField" configuration directive:
Andre Bunting [andreb at techess.com] wrote:
> Hi.. I have read this topic.. on that page..
> I wish to know if anyone has done this before..
> I would like to get their feed back on how effective it has
> work.. as well as a working example..
Many people do this, and it works perfect. You can set the flypage to
"change" based on any field you want, usually in the products DB. So,
lets say you choose "prod_group", then each prod_type can have a
separate flypage made, falling back on just flypage.html (I believe) if
none exists for a particular prod_type value.
I use it, but my flypages look the same. I use it to run different
queries based on certain things, but visually, its almost the same.
> Does this also mean that each item ended, one will have to
> set what flypage to use ?(dumb quesito.. but I want to make sure)
Well, it can be transparent, as you would "base" it on a field, say
'prod_group', or 'category', so you are setting those anyways. Of
course, if you based them upon whim, then yes, you'd have to set it
manually each time.
If the value of prod_group is "watches", then it would appear on the
"watches.html" flypage, if the value was tools, then it would appear on
the "tools.html" flypage.
[snip top posting]
More information about the interchange-users