by extragear » Thu Nov 06, 2008 8:33 am
Loren
Thanks for the info. Your suggestions have clarified it for the most part.
Here is what I did:
1. I viewed the source code for the product in question and it was referencing the OLD product template
2. I checked the unmodified page template and it shows the following:
[-- END_IF --]
[-- LOOP PRODUCTS --]
<tr>
<td>[-- PRODUCT sd360_productFeatured_template.html --]</td>
</tr>
[-- END_LOOP PRODUCTS --]
<tr>
<td><hr noshade></td>
</tr>
[-- IF Page.Text2 --]
<tr>
<td style="padding: 10px">[-- Page.Text2 --]</td>
</tr>
[-- END_IF --]
[-- IF Page.NumProducts 0 --]
[-- ELSE --]
<tr>
<td style="padding: 10px"><table width="100%" border="0" cellspacing="0"
cellpadding="5">
[-- LOOP PRODUCTS 3 --]
<td width="33%" valign="top" align="center">
[-- PRODUCT --]
</td>
[-- END_LOOP PRODUCTS --]
</table>
3. PRODUCT sd360_productFeatured_template.html is the OLD product template.
So I as you mentioned, the product template is hard coded into the page template.
Ok, this clarifies it for the most part.
4. I made a NEW page template that references the NEW product template.
I called the new product template sd360_productFeatured_templatemod.html
Ok, great. I regenerated and the product in question is now using the new product template along with its associated new product more information include. Great.
5. But then I began to think about the following situations:
A. If you have a product and its not assigned to any page, would the product then use whatever layout that it was assigned?
From the very limited experiments I did I would say yes.
B. What if a product is assigned to three different pages. Each page is assigned to a different page layout. And each page layout references a different product layout.
Is there a pecking order as to which page layout which predominate?
Once again, I did some experiments and but couldnt find an answer.
6. I then reconsidered what you stated about the page template. Specifically about how,
"Note that some page templates can (through an optional extra parameter for the [-- PRODUCTS --] tag in the [-- LOOP PRODUCTS --] loop) override the template that is used for the product so that a specific product template is used instead of the one actually assigned to the product."
With this in mind I created a new page template. I simply copied our original template. Then I removed the following:
[-- END_IF --]
[-- LOOP PRODUCTS --]
<tr>
<td>[-- PRODUCT sd360_productFeatured_template2.html --]</td>
</tr>
[-- END_LOOP PRODUCTS --]
7. At this point I went and assigned this new page template to a page. Then I assigned some products to this page. Some products used the new product template and some used the old product template. Regenerate.
And presto it appears now that whatever layout is assigned at the product level will not be overridden when its assigned to a page that features this new page layout.
So my questions concerning this are:
A. Is this analysis correct?
B. Is there a reason for hard coding the product layout in the page layout?
Thanks
Tim