Frage

How can I use local.xml to insert a block?

I want to insert the static block (identifier: footer_links) from the cms into this footer block inside my page.xml, but before footer_links,

<block type="core/template" name="bottom.footer" as="bottom.footer" template="page/html/footer-bottom.phtml">
   <block type="page/switch" name="store_switcher" as="store_switcher" template="page/switch/stores.phtml"/>
   <block type="page/template_links" name="footer_links" as="footer_links" template="page/template/links.phtml"/>
</block>

this is the config in my local.xml,

<block type="cms/block" name="cms_footer_links" before="footer_links">
 <!--
                The content of this block is taken from the database by its block_id.
                You can manage it in admin CMS -> Static Blocks
            -->
<action method="setBlockId"><block_id>footer_links</block_id></action>
</block>

is it possible?

EDIT:

local.xml

<?xml version="1.0"?>

<layout>
    <default>

        <!-- removing blocks -->
        <remove name="paypal.partner.right.logo"/>
        <remove name="tags_popular"/>
        <remove name="right.permanent.callout"/>
        <block type="cms/block" name="cms_footer_links" before="footer_links">
            <!--
                The content of this block is taken from the database by its block_id.
                You can manage it in admin CMS -> Static Blocks
            -->
            <action method="setBlockId"><block_id>footer_links</block_id></action>
        </block>

    </default>

</layout>

Keine korrekte Lösung

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit magento.stackexchange
scroll top