0

I am using Magento 1.9.2.1 with "porto" theme.

I have created a few CMS info pages for things like "reasons to buy" etc. I have the pages set to 2 column with left sidebar but there is nothing showing in the sidebar.

How can I add blocks like recently viewed / categories etc to the CMS pages using Layout Update XML as it looks a bit empty at the moment!

Just to add I am not a coder, I have extremely limited and basic knowledge so to anyone that does reply please treat it as an "idiots guide" lol

2 Answers 2

2

Catalog -> Manage Categories -> [select category] -> Custom Design

Put this code snipet to 'Custom Layout Update' textarea:

<reference name="left">
    <block type="reports/product_viewed" before="-" name="left.reports.product.viewed" template="reports/product_viewed.phtml" />
</reference>
2
  • Thanks for the reply but nothing changed. The cache isnt enabled, I added the code to layout XML update, saved and refreshed on the front end and nothing. Btw, this is for a CMS page, not a category page. I added the code to the CMS page. Is the code different for that as the answer posted refered to category pages.
    – Steve
    Dec 6, 2015 at 20:11
  • Maybe this block is removed? Change block name and see what happens. Do you see anything in error log?
    – SeStro
    Dec 6, 2015 at 20:32
0

CMS >> pages >> [select cmspage] >> Design >> in "Layout Update XML" text area add the below code for show recently view product on products on left site bar on selected CMS page:-

<reference name="left">
    <block type="reports/product_viewed" before="-" name="left.reports.product.viewed" template="reports/product_viewed.phtml" />
</reference>

For add category block in CMS page please add below code in "Layout Update XML" text area:-

<reference name="left">            
            <block type="catalog/navigation" name="catalog.category" before="-" template="catalog/category/category_nav.phtml"/>
            <reference name="catalog.leftnav">
                <action method="unsetChild"><child>category_filter</child></action>
            </reference>
</reference>

After that On line no 37 in \app\design\frontend\smartwave\porto\template\catalog\category\category_nav.phtml file you need to comment below code because this not work on cms page.

<?php echo Mage::registry('current_category')->getName(); ?>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.