[ic] Flypage, multiple product tables, and [item-field]

Todd L. Cawthron interchange-users@interchange.redhat.com
Wed Oct 24 17:26:01 2001


To begin with, I am using Interchange 4.8.2 with Sybase 11 on Red Hat Linux
7.

I am trying to build on-the-fly pages using multiple "product" tables and
multiple flypage templates.  PageSelectField is set in catalog.cfg to the
name of the column (its the same column in all product tables) that contains
the name of the template to use.  On my template pages, I have a number of
[item-field fieldname] tags.

In short, pages are not being displayed as expected (the page is displayed,
but only one [item-field...] value is output) when I have multiple tables
listed as ProductFiles, but they do display properly if only one table is
listed in the ProductFiles directive.

Here are the gory details...

SCENARIO ONE:  One product table
My catalog.cfg looks like this:

ProductFiles        product_view_web
PageSelectField   web_template

When I enter a URL with a valid code in my browser, I get the correct page
with the correct template.  The value of each arbitrary field (where a value
exists) is displayed as it should in place of the [item-field fieldname]
tags.  Everything works as expected when I look at different product codes
or use a different template.

SCENARIO TWO:  Multiple product tables
My catalog.cfg looks like this:

ProductFiles        product_view_web content_view_web
PageSelectField   web_template

When I enter a URL with a valid code in my browser, I get the correct page
with the correct template.  This part works great no matter which table is
being accessed or which template is being used.  However, only the first
[item-field fieldname] tag is displaying any data.  None of the other
[item-field...] tags are resulting in any data from the database.  I can
change the field that is being accessed in the first tag and can
successfully display any field in the database as long as it is the first
[item-field...] tag.  The other [item-field...] tags in the template are
ignored completely (not entirely true, they are apparently interpolated to
some extent because they have been removed in the resulting HTML page).
This behavior is the same no matter which template is being used, which
table is being accessed, or which fields are set to be displayed.

If I remove either of the tables from the ProductFiles directive, everything
works great and all fields are displayed.  It does not matter which
"product" table is specified as long as there is only one.

If I use [item-data db field] instead of [item-field field] then everything
works fine, even if multiple tables are listed as ProductFiles.  The
downsides of this include the need to create a template for each product
table and that the name of the database gets mixed up in the design of the
page instead of being abstracted.

Has anybody run into this problem before and, more importantly, does anybody
have any suggestions to fix it?

Todd Cawthron