Gerard Nijboer
Gerard Nijboer

Reputation: 512

Magento category meta title disappears with custom template

I'm using a Magento template called Bootstrapped (http://bootstrapped.magenthon.com), and am editing this template to fit our needs. Since our website's navigation is based on (sub-)categories, we use a roadmap to help guide the user through the system.

Therefore, we have edited the main category of our products with the following custom XML:

<!-- Remove Breadcrumbs -->
<reference name="head"><remove name="breadcrumbs" /></reference>

<!-- Set Roadmap template -->
<reference name="content"><reference name="category.products">
    <block type="catalog/navigation" name="roadmap" template="alphabase/catalog/roadmap.phtml">
        <action method="setData"><name>roadmap_type</name><value>onderdelen</value></action>
        <action method="setData"><name>maxlevels</name><value>6</value></action>
    </block>

    <action method="setTemplate"><template>catalog/category/view.roadmap.phtml</template></action>
    <action method="setData"><name>roadmap_type</name><value>onderdelen</value></action>
    <action method="setData"><name>per_row</name><value>4</value></action>

    <reference name="products.list">
        <action method="setData"><name>roadmap_type</name><value>onderdelen</value></action>
    </reference>
</reference></reference>

Now when I apply this update, the website's meta title does not show any of the 'breadcrumbs' that the user has followed so far, it only shows the shop's name.

However, when I remove the custom XML, the meta title neatly displays the 'breadcrumbs' in the title, followed by the suffix we have set through the admin panel.

I have compared the original file in /app/design/frontend/package/default/template/catalog/category/view.phtml with the file I am using, but I just can't seem to figure it out.

I would say it has something to do with the Bootstrapped theme I'm using, but then why would it work when I remove this simple custom XML?

Also, the title does change when I set a meta title in the category settings, and it adds the suffix, but it does not show the 'path'. The website also displays my meta description when I set one.

I have also looked at the file in /app/code/core/Mage/Catalog/Block/Category/View.php but nothing's there that would give me a hint on what goes wrong.

Could anyone help me get to the right direction?

EDIT: I have also tried removing the file in templates/page/html/head.phtml from my custom theme, just to see if that does anything wrong, but nothing changed after that, either.

EDIT2: My sub-categories use the parent category settings.

Upvotes: 0

Views: 1628

Answers (1)

elfling
elfling

Reputation: 835

Old question - however I found that the following in general kills meta title

<remove name="breadcrumbs" />

Once you add that to any layout, the meta title returns blank.

Upvotes: 0

Related Questions