This question already has an answer here:
- Debugging layout XML loading 6 answers
Are there any tools or techniques for identifying the overrides/merges/potential conflicts with layout XML in Magento?
I think what I'm looking for is something like n98-magerun's
I use Alan Storm's Layoutviewer module for ?showLayout=page to debug, but that only gives me the total merged layout. I also know that I can
echo the filenames as they are loaded and merged in core, but I don't like to have to hook that up every time.
My question comes from the occasional frustration with tracking down which layout XML file from which package or theme is being loaded, as the handles aren't always logically placed.
As an example (not a real situation), let's say I need to find where the block
product.view.extra is configured in layout XML. It ends up being defined on the handle
extra_product_stuff and called in via
update node in the
PRODUCT_TYPE_simple handle -- all this is contained in
somemodulelayout.xml or other ambiguously named file.
Let's say that, to grind my gears even more, the file is duplicated but changed slightly in another design package and on a couple of themes in between.
I load up a product detail page, and see some "extra" content at the bottom of the page. Where did it come from? I turn on template hints, and find the block and template. There's a start. I use Alan Storm's layout viewer, and see the block name/alias. I start
greping for that name on
skin/frontend, and see several instances. I check the one I think is relevant to my current design config. Now I'm ready to modify it.
What I want to do is simplify the steps in the above to track this stuff down. So maybe I'd like to see, perhaps in the template hints feature, the layout XML file OUT OF WHICH this block was defined and generated.
And maybe that answers my own question: If there's not a tool for this, I either build it out myself or else keep truckin' with usual sleuthing techniques. I was just looking to hear about OTHER techniques in this arena.
Will close today for #MageStackDay if I don't get a reply :)