Magento Forum

   
Difficulty getting category layout updates to apply to child/sub categories
 
Simon King
Member
 
Avatar
Total Posts:  46
Joined:  2008-01-10
 

I’m a little stumped trying to get my category’s layout update xml to apply to its children. I’m trying to add a number of static blocks using the ‘Custom Design’ tab on category admin. I’m selecting the ‘This category and its child categories’ option for ‘Apply To’, however the updates are still only applied to the top-most category. I’ve tried resetting the cache but still nothing.

Before I go into debug mode, can anyone shed any light as to why this might be? Has any body else managed to get layout updates to work in this way?

Regards,
Simon

 
Magento Community Magento Community
Magento Community
Magento Community
 
adder
Jr. Member
 
Total Posts:  3
Joined:  2008-03-12
 

I’m in the same problem.

I just installed the 1.1 beta versión with the same result.

Someone there with the solution?.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Simon King
Member
 
Avatar
Total Posts:  46
Joined:  2008-01-10
 

I looked into this more in version 1.0 and came the the conclusion that either:

a) It’s not implemented yet

or

b) It’s not supposed to work the way the form implies - i.e. the dates and inheritance options apply to the custom design only, not the custom layout updates.

I had a go at implementing it but I couldn’t find an easy way to implement it without having to traverse right up the category tree each time.

I’d quite like this feature though, as the only alternative is having to ripple layout changes down the category tree manually using admin.

 
Magento Community Magento Community
Magento Community
Magento Community
 
maijar
Member
 
Total Posts:  49
Joined:  2008-06-15
 

Quite same problem here. I tried to apply new custom design to root category and its childs, but nothing happens. If I apply the same custom design straight to child category, it works well for that one category. If I had many child categories and I had to apply design to all of them one by one, it would take much time.

I thought this would be easy because of that feature but I guess I was dreaming…

 
Magento Community Magento Community
Magento Community
Magento Community
 
Simon King
Member
 
Avatar
Total Posts:  46
Joined:  2008-01-10
 

If you’re wanting to apply layout update changes to all categories and subcategories it’s possible to do so using the catalog.xml layout file. It just doesn’t seem to be possible if you’re wanting to target specific subtrees of categories via admin.

 
Magento Community Magento Community
Magento Community
Magento Community
 
maijar
Member
 
Total Posts:  49
Joined:  2008-06-15
 

So Simon you think it’s not possible to have different layout for one root category and its childs (I have many root categories) by modifying xml-file? Meaning, all categories and subcategories = all root categories and sub categories?
Stupid question, but I just want to be very sure smile

 
Magento Community Magento Community
Magento Community
Magento Community
 
Simon King
Member
 
Avatar
Total Posts:  46
Joined:  2008-01-10
 

I don’t think so, although I would love to be proved wrong!

There are update handles such as

<default> - everything
<catalog_category_default> - all standard categories (or possibly all categories, not sure which)
<catalog_category_layered> - all layered navigation anchors

then I think there’s

<catalog_category_CATEGORYID> - targets the specific category. I’m assuming this doesn’t ripple down to subcategories, but I could be wrong.

Any more?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Global Backing
Jr. Member
 
Total Posts:  15
Joined:  2010-11-15
 

I tried <catalog_category_CATEGORYID> but it doesn’t seem to work.

Does anyone know if this is supposed to work?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Global Backing
Jr. Member
 
Total Posts:  15
Joined:  2010-11-15
 

I found out how to link the layout file to a specific category.

<CATEGORY_ID>

</CATEGORY_ID>

Make sure category is in capitals and replace id with the category id you are targeting.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top