0

I don't want any of Magento's banners to appear on my site. Without altering the core theme, how do I remove all banner blocks? I assume this is another magical Magento xml layout incantation?

This doesn't work: <remove name="banner" />

0

Well, the great thing is that there's no magic in Magento. You've probably heard the Arthur Clarke quote that "any sufficiently advanced technology is indistinguishable from magic." The layers of cause and effect can be confusing, though.

I am not sure whether all "banners" share a common block. What you'll want to do is track down the template that contains the banner you're interested in (try searching by CSS class or similar). Then you can text-search for the template name to locate the layout xml files that include the template - this tells you the block names. From there you can craft the correct statement for removing the blocks.

Also, try checking out this similar thread: Magento - remove block using update XML. Happy hacking!

4
  • They are not called specifically in templates. – jmargolisvt Nov 22 '16 at 22:17
  • @jmargolisvt What is the element as is appears on the page? What are the CSS classes? If you provide that info, maybe we can locate the template, or if it's really not in a template, just the layout file directly in order to locate the block names. – nshiff Nov 22 '16 at 22:23
  • They are official Magento Banners that are called with a series of Magento Widgets of type "Banner Rotator." I can eliminate them individually. I'm looking for an XML layout solution that simply removes them all from the layout. They appear to live in this block: <block type="page/html_wrapper" name="top.container" as="topContainer" translate="label"> in my theme's page.xml. – jmargolisvt Nov 22 '16 at 22:27
  • I think you should be able to do this -- <remove name="topContainer" /> – nshiff Nov 22 '16 at 22:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.