1

I am about 3 months into Magento at this point. I have worked with static blocks core_blocks being used in a store for categories to either supplement or replace the category list. I know these are referenced in table eav_attribute as value='landing_page'.

I would like to find out our "orphaned" static blocks. Where else can static blocks be used, and what are the possible values in the eav tables that would identify them?

3
  • Did you tag this question correctly? Magento v1.4? Jul 22, 2015 at 13:17
  • yes - this is the version we are using. Perhaps you could share any difference later versions use blocks for as well, of course. Jul 22, 2015 at 13:32
  • 1
    I was just surprised as 1.4 is quite old and VERY buggy. There are multiple high-priority security fixes in later versions. Jul 24, 2015 at 18:27

1 Answer 1

1

Unfortunately there is no final answer to this, static blocks can be included in many different ways.

Core features

  • Static blocks can be included in the CMS, using a widget directive: Search for widget type="cms/widget_block" in cms_page.content and cms_block.content
  • Static blocks can be added as widget instances. Search for widget instances with the type "CMS Static Block": screenshot widget instances

    (or in the database: select * from widget_instance where instance_type='cms/widget_block')

  • Static blocks can be added with layout XML like this:

    <block type="cms/block" name="foobar">
        <action method="setBlockId"><block_id>the_block_id</block_id></action>
     </block>
    

    Search for <action method="setBlockId"> in catalog_product_entity_text and catalog_category_entity_text. There are several attributes that contain layout XML updates.

Extension/Theme features

  • Extensions could add their own EAV attributes that refer to a static block, similar to landing_page, or configuration values (in the core_config_data table). Search for 'cms/block' in app/code/community and app/code/local to find out where static blocks are used.
  • Also search in app/design, there might be hard coded includes.
  • There might be WYSIWYG attributes with widgets enabled, so search for widget type="cms/widget_block" in catalog_product_entity_text, catalog_category_entity_text and eav_entity_text.
  • Search for <action method="setBlockId"> in app/design/frontend to find blocks added via layout XML in the theme.
1
  • Good works... :)
    – Amit Bera
    Jan 4, 2016 at 8:29

Your Answer

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

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