by mjbrunelle » Sat Mar 05, 2011 5:22 am
Here are examples, we have different product table column counts depending on the product group being viewed.
We use Product.Field10 through 14 for the product data, and Page.Field10 through 14 for the column headers.
In the product template,
[-- IF PRODUCT.Field10 --]
<td class="productRow">[-- PRODUCT.Field10 --]</td>
[-- END_IF --]
[-- IF PRODUCT.Field11 --]
<td class="productRow">[-- PRODUCT.Field11 --]</td>
[-- END_IF --]
and so on
There is a corresponding sequence in the page template to included the add columns headers.
As for the other method Jim pointed out, we have multiple page types. Based on the page field data we include a different page definition.
<td class="contentpage">
[-- IF PAGE.Field2 "NoProduct" --]
[-- INCLUDE dmiNoProductPage.sst PROCESS --]
[-- ELSE_IF PAGE.Field2 "Product" --]
[-- INCLUDE dmiProductPage.sst PROCESS --]
[-- ELSE_IF PAGE.Field2 "Catalog" --]
[-- INCLUDE dmiCatalogPage.sst PROCESS --]
[-- ELSE_IF PAGE.Field2 "Category" --]
[-- PAGE.Text2 --]
and so on. to [-- END_IF --]