鏈路

2014-01-06 13 views
0

添加圖標,而不是標籤,我會寫這樣的代碼:鏈路

<action method="addLink" translate="label title" module="checkout"> 
    <label>Cart</label> 
    <url helper="checkout/url/getCartUrl"/> 
    <title>Cart</title> 
    <prepare/> 
    <urlParams/> 
    <position>150</position> 
</action> 

但代替label我要顯示的圖像。我怎麼能在上面的xml代碼中添加圖片?

回答

1
<action method="addLink" translate="label title" module="checkout"> 
    <label>Cart</label> 
    <url helper="checkout/url/getCartUrl"/> 
    <title>Cart</title> 
    <prepare/> 
    <urlParams/> 
    <position>150</position> 
    <liParams /> 
    <aParams><![CDATA[ class="cart"]]></aParams> 
</action> 

這應該一類cart添加到<a>元素。你可以添加你的CSS來隱藏文本並顯示一個圖標。