1

How can I customize several landing pages so the client can easily add/remove new categories without having to figure out the layout update bit.

Basically I have 2 types of landing pages, the default landing and a page for products that belong to an exploded view. In the exploded view product category I've added this to the layout update:

<reference name="content">
        <reference name="category.products">
            <action method="setTemplate"><file>catalog/category/exploded-view-landing.phtml</file></action>
        </reference>
</reference>

<reference name="root">
        <remove name="home.landing.catalog.product.new" />
</reference>

Which is fine, it works and allows me to setup a custom layout without issues.

HOWEVER

The client will need to add these "exploded view" pages on their own. Finding, copying & pasting some XML from another resource isn't going to make them happy, I know it's pretty simple - but these are clients not developers.

Is there a way to achieve the same goal by using the local.xml and just having to train the client to "pick the right" layout/template from Page Layout drop down?

1 Answer 1

1

You can whip up a quick extension (How do I add a new template in magento?) to add new templates to the page layout drop down options for your client to easily select from.

4
  • github.com/SeakEcommerce/AdditionalLayouts/blob/master/… - via GitHub repo
    – BENN1TH
    Commented Sep 22, 2015 at 21:14
  • Well, I got it to show up in the drop down, but I'm getting an error: Call to a member function getProductCount() on a non-object .. I think it needs a little more info? Commented Sep 24, 2015 at 19:18
  • where is that error occurring? In the admin or frontend? If it in the frontend I would say you have an error in your phtml template file. This code is pretty basic so if and admin issue please post your config.xml
    – BENN1TH
    Commented Sep 25, 2015 at 1:18
  • It's in the front end - I think the issue is really in the language of my question - what I am really trying to do is change the block - I'm probably getting the error because I am now trying to display a block as a template and key objects are not getting loaded. I think I can create a proper template for this & then specify which blocks to display in my local.xml for that template. Gonna take some work though. Commented Sep 25, 2015 at 12:38

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.