Magento category meta title disappears with custom template - magento

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.

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.

Related

how to display a text on right using magento

I have written a code that displays a text hello world on right of the magento homepage, but however when I browse to other links like My Account, My WishList etc., it disappears. My question is how will I be able to display Hello World in every pages using reference name="right"?
<default>
<reference name="right">
<block type="core/template" name="catalog.helloworld" template="catalog/helloworld.phtml" />
</reference>
</default>
It works when I write reference name = "content".
The text is displayed where the block "right" is present, you can search your project for <remove name="right"/> and find where right block has been removed for the pages (my wishlist, myaccount, etc..)
Now you can enable this block by removing these tags, or (recommended) you can create your own block and add it to layout/page.xml

Cookie restriction notice in header instead of footer

I'm looking for a solution for our web shop.
We're using the Magento RWD default theme on our site/webshop (www.jessicaglassart.nl). As in the users guide of Magento version 1.9, the cookie restriction mode notice is shown on the bottom of the page (I unfortunately cannot place a picture due to my lack of reputation).
However, I want this restriction notice in the header. Can someone please tell me how to fix that? And, if changing the picture in the message is easy, can someone also tell me how I change the picture?
The proper way of moving the notice to the header is by placing the following in a layout xml file (e.g. local.xml in a custom theme)
<default>
<reference name="before_body_end">
<action method="unsetChild">
<alias>global_cookie_notice</alias>
</action>
</reference>
<reference name="after_body_start">
<action method="insert">
<block>global_cookie_notice</block>
</action>
</reference>
</default>
To change the picture, you would need to do that using custom CSS since the demo image is place through CSS.
my dirty way in 1.9 :
go to /public_html/app/design/frontend/rwd/default/layout/page.xml
comment line 158 (in my case) then copy and move this block :
<block type="page/html_cookieNotice" name="global_cookie_notice" as ="global_cookie_notice" template="page/html/cookienotice.phtml" before="-" />
underneath line 91 (in my case) where is :
<label>Page Top</label>
Works for me and this could solve problem with no tracking hits in Google analytics's - people see message on the top than click to agree, who scroll to the bottom of page those days? Have done test on heat map of our wheel shop less than 2% of visitors go to footer.

Modifying Magento layout for specific pages or extensions without impacting other pages

New to Magento here, looking for advice in making sure I modify the correct files to limit the scope of changes and not run into any issues when updating. I installed the following extension for FAQ function:
http://www.magentocommerce.com/magento-connect/flagbit-faq.html
By default the front end FAQ page was displaying with 2 columns (1 left sidebar showing a product comparison block which was unnecessary on a FAQ page). I found the following file:
/app/design/frontend/base/default/layout/faq.xml
And changed:
<default>
<reference name="root">
<action method="setTemplate"><template>page/page/2columns-left.phtml</template></action>
</reference>
</default>
To:
<default>
<reference name="root">
<action method="setTemplate"><template>page/1column.phtml</template></action>
</reference>
</default>
This had the desired result on the FAQ page, but also the undesired result of removing the compare box from the actual product list page. How would I best make the desired change to the FAQ page layout without impacting other pages?
Their module's faq.xml shouldn't be setting that on the default node.
Inspect the page and look for the class on body. It might be something like cms-faq (should say something about faq). Convert the dash - to an underscore _ and use that value in place of default in faq.xml
<cms_faq>
<reference name="root">
....
</cms_faq>
That should make sure the change to the setTemplate action only affects that page.
By setting default there, they are targeting all layout handles, which is really not what they should be doing in a module that just creates a new page.

Magento Cart layout change not sticking

Sorry this is a novice question...
I have changed the layout of my magento cart to popup.html.
i have edited the checkout.xml to use popup.phtml... this is the code i have used in the checkout.xml....
<checkout_cart_index translate="label">
<label>Shopping Cart</label>
<remove name="right"/>
<remove name="left"/>
<reference name="root">
<action method="setTemplate">
<template>page/popup.phtml</template>
</action>
</reference>
</checkout_cart_index>
The problem is that everything was working fine... but i was making changes on the category page and suddenly the cart has stopped showing layout popup.phtml and has started showing 2 column-left and that too without the cart content.
i was making some changes to catalog.xml ... but cant see how it would override the display of checkout/cart
I have been banging my head around this for couple of hours now... Any suggestions as to where i should look to see whats overriding the popup.phtml completely and just displaying an empty two column layout with left column.
thanks..much appreciate..
The particular file generally does not matter. What matters is the layout update handle, i.e. top level nodes in layout update XML, e.g. default, catalog_category_layered, checkout_onepage_index. It is these which "scope" your layout XML directives.

Magento 'Sort By' - How to make Magento forget which option was selected

Something that I have not noticed before is that Magento will remember which option you've selected to 'Sort By' on category list pages. So if you go to a category page, and lets say the default sort is ordered by price, if you change the sort to be ordered by name instead, the page reloads and all is well.
However, if you remove the get variable(s) in the URL and reload the page, it still sorts by name instead of reverting back to price.
I was thinking this was a problem specific to the site I'm working on, as there are some custom things happening with collection building and sorting and such, but I've now checked a handful of other Magento sites (some of which I found at random on the web) and they all do the same thing.
Does anyone know how this is being 'remembered'? Is this stored in user's session? I would think it's part of caching, but this site is still in development and thus caching is disabled.
It's not that big of a deal, but it does seem like a bug.
The sort order parameter is stored in session. See Mage_Catalog_Block_Product_List_Toolbar::getCurrentOrder method. You can switch it off by calling Mage_Catalog_Block_Product_List_Toolbar::disableParamsMemorizing method or by setting params_memorize_allowed in catalog session. I mean Mage::getSingleton('catalog/session')->setParamsMemorizeAllowed(true)
What worked for me is adding this in local.xml:
<!--
Category default layout
-->
<catalog_category_default translate="label">
<!-- Disable memorizing toolbar parameters -->
<reference name="content">
<reference name="product_list_toolbar">
<action method="disableParamsMemorizing" />
</reference>
</reference>
</catalog_category_default>
<!--
Category layered navigation layout
-->
<catalog_category_layered translate="label">
<!-- Disable memorizing toolbar parameters -->
<reference name="content">
<reference name="product_list_toolbar">
<action method="disableParamsMemorizing" />
</reference>
</reference>
</catalog_category_layered>

Resources