If a product, category or CMS page is never cached despite an enabled Full Page Cache , the cause is not always Varnish, Redis or cache configuration. Sometimes a single layout XML block can exclude the entire page from full…
Displaying the Active Layout Handles of a Page (Magento 2)
When a Magento 2 layout XML change does not take effect, first check the active Layout Handles. A layout XML file is processed only when its corresponding handle is active on the page. You can display the current handles directly…
Displaying a CMS block below products on category pages (Magento 2)
In Magento 2, you can assign a CMS block to a category. Usually it appears above the products. By modifying the file catalog_category_view.xml, you can move the block below the product list. Copy the file vendor/magento/module-catalog/view/frontend/layout/catalog_category_view.xml into your child theme…
Solving the “Required parameter ‘theme_dir’ was not passed” error (Magento 2)
The Required parameter ‘theme_dir’ was not passed is most likely caused by an invalid theme table in your database. Solution: Open the theme table and delete all rows that refer to a theme that does not exist.
Fixing Required parameter ‘theme_dir’ was not passed (Magento 2)
If the error message Required parameter ‘theme_dir’ was not passed appears in your Magento 2 store, the cause is very likely the themetable. It contains theme entries whose file paths no longer exist on the server. Solution: Open Tabelle theme…
Selecting a custom product page template (phtml) (Magento 1)
To use a custom template for your product page, create the template file and then specify the following layout update in the product’s layout section: catalog/product/view-individuell.phtml catalog/product/view/media-individuell.phtml
Changing the title tag of the home page or any CMS page (Magento 1)
Magento automatically adds the defined suffix to the title tag on every page. If you want to change that for lets say the home page, open the CMS page “home” and add the following XML to the layout section:
|
1 2 3 |
<reference name="head"> <action method="setData"><key>title</key><value>... Title Tag ...</value></action> </reference> |
Adding a static block to the sidebar (Magento 1)
Using the folowing layout update, you can add a static block to the left sidebar:
|
1 2 3 4 5 6 |
<!-- left --> <reference name="left"> <block type="cms/block" name="STATIC_BLOCK_NAME"> <action method="setBlockId"><block_id>STATIC_BLOCK_ID</block_id></action> </block> </reference> |
Removing the breadcrumb navigation on all pages (Magento 1)
Create a local copy of \app\design\frontend\base\default\layout\page.xml and remove or comment the following line:
|
1 |
<block type="page/html_breadcrumbs" name="breadcrumbs" as="breadcrumbs"/> |
Changing the column count for the upsell product area programmatically (Magento 1)
To change the Magento upsell product areas column count programmatically, use the following code:
|
1 |
$this->setColumnCount(4); |