Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set link is Mage::getBaseUrl for breadcrumbs in layout?

Tags:

url

magento

From layout, how can I set crumbInfo/link is Mage::getBaseUrl() for breadcrumbs?

<layout version="0.1.0">
    <contacts_index_index translate="label">
        <reference name="breadcrumbs">
            <action method="addCrumb">
                <crumbName>Accueil</crumbName>
                <crumbInfo>
                    <label>Accueil</label>
                    <title>Accueil</title>
                    <link>/</link><!--How can I set Mage::getBaseUrl() here-->
                </crumbInfo>
            </action>
            <action method="addCrumb">
                <crumbName>Contactez-nous</crumbName>
                <crumbInfo>
                    <label>Contactez-nous</label>
                    <title>Contactez-nous</title>
                </crumbInfo>
            </action>
        </reference>
    </contacts_index_index>
</layout>
like image 394
vietean Avatar asked Dec 02 '22 01:12

vietean


1 Answers

If you want to use URL in layout XML then Try this that will work everywhere :

<link>{{baseUrl}}</link>
<link>{{baseSecureUrl}}</link>
<!-- Using Identifier -->
<link>{{baseUrl}}some-identifier</link>

Basically when Mage_Core_Model_Layout_Update constructor call that will parse {{baseUrl}} and {{baseSecureUrl}}.

These will work for all layout file.

like image 197
Piyush Lathiya Avatar answered Dec 18 '22 14:12

Piyush Lathiya