0

I have one block on the page :

<block type="obishomeaddon/customcategory" name="customcategory" template="homeaddon/customcategory.phtml">
 <action method="setData"> <name>column_count</name> <value>4</value> </action>
 <action method="setData"> <name>category_id</name> <value>213</value> </action>
</block>

Now, I want to have two of these blocks but different category_id. The problem I have is Magento will loop through the XML first, so the last category_id will be set and all the blocks will have the same category_id

Which is a good way to solve this problem?

Aasim Goriya
5,4622 gold badges30 silver badges54 bronze badges
asked Feb 18, 2013 at 13:34
4
  • Did you gave your blocks different names? Commented Feb 18, 2013 at 13:39
  • yep, different names - different blocks Commented Feb 18, 2013 at 13:43
  • thanks you guys. This is a stupid question, I didn't notice the name was the same :) Commented Feb 18, 2013 at 15:06
  • Posted as an answer. Commented Feb 19, 2013 at 7:40

1 Answer 1

1

Please make sure your blocks have different names.

answered Feb 19, 2013 at 7:39

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.