开发者

Magento - catalog.xml not using correct template

开发者 https://www.devze.com 2023-04-11 06:40 出处:网络
Noob developing a Magento theme and I can\'t seem to figure out why Magento is not using the path I specify in the setTemplate action on catalog.xml.

Noob developing a Magento theme and I can't seem to figure out why Magento is not using the path I specify in the setTemplate action on catalog.xml.

I've got my own theme in /app/design/frontend/default/mycustomtheme and I've been patching files over from the base and making changes.

I've copied over /app/design/frontend/base/default/layout/catalog.xml to my custom theme at /app/design/frontend/default/mycustomtheme/layout/catalog.xml. I've set the template to be a specific phtml file...

<catalog_product_view translate="label"&开发者_开发问答gt;
    <label>Catalog Product View (Any)</label>
    <!-- Mage_Catalog -->
    <reference name="root">
        <action method="setTemplate"><template>page/2column.phtml</template></action>
    </reference>

Yet it's not working. Can someone spot what the problem might be? I've got all cache disabled and other changes I make I can see immediately, just not this one.

edit: I should note, if I change something else in the catalog_product_view xml node I see those changes are reflected. For instance if I remove <action method="addJs"><script>varien/product.js</script></action> then I see the reference is removed in the rendered html file.

edit2: Adding images to address questions ...

did you setup-up / configured the theme from your store backend?

Yes, and it's actually loading the correct header and footer, and it's properly styled.

Magento - catalog.xml not using correct template

Are you sure you have such template under /app/design/frontend/default/mycustomtheme/template/page/ directory?

Yes, I can confirm the file is there

Magento - catalog.xml not using correct template


OMG. The (one and only) product I was testing on had a specific layout set under the "Design" section. So I guess that was overriding anything I had set in catalog.xml

Magento - catalog.xml not using correct template

I'd like to have the 3 hours of my life back.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号