I have created a module with several different controllers and therefore different pages.
I want to have a default sidebar on each of my own pages but not the rest of the site.
when i use the <default></default> it obviously propogates throughout the entire site.
When i try <mymodule_default></mymodule_default> nothing happens.
I am therefore left with having to copy and paste my whole layout for each seperate page of my module.
Is there any way in magento layouts to specify only once, some xml that is to be shared by each page that belongs to a module?
Sure, this is definitely possible. When you load a layout using
loadLayout, there are implicit arguments to the function, even though it is typically called sans arguments. The loadLayout function will actually take one or more strings for layouts to load by default. Which means that you can do this:Define a layout for that handle like so:
Hope that helps!
Thanks,
Joe