2014-01-20 38 views
0

有人可以告诉我如何在订购后定位自定义链接并返回链接,并在联系我们之前? 我已经添加了链接在local.xml中使用的代码片段:如何在订单后添加自定义链接并返回页脚的magento

<reference name="footer_links"> 
    <action method="addLink" translate="label title"> 
    <label>Link1</label> 
    <url>Link1</url> 
    <title>Link1</title> 
    <prepare>true</prepare> 
    </action> 
</reference> 

,但我不能把订单和联系我们友情链接之间的联系。 <position>1</position>无法正常工作

请指教!!!

回答

0

自己解决这个问题。 in app \ design \ frontend \ customtheme \ default \ layout \ contacts.xml后加<reference name="footer_links">以下代码:

<action method="addLink" translate="label title"><label>mylinklabel</label><url>mylink-url</url><title>mylinktitle</title><prepare>true</prepare></action> 
0

我这样做的方式是在PACKAGE/TEMPLATE/app/template/page/html/footer.phtml中创建一个footer.phtml,并将其打入我用我想要的链接构建的CMS页脚页面。

<div class="footer-container"> 
<div class="footer"> 
    <div class="quicknavHolder"><?php echo $this->getChildHtml('topLinks') ?></div> 
    <?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('sm-footer')->toHtml(); ?> 
     <address><?php echo $this->getCopyright() ?></address> 
</div> 

然后在CMS块被称为“SM-页脚”我把所有我想要的链接的顺序,我想他们。

<center> 
<table style="padding-bottom: 15px; text-transform: uppercase;" border="0" cellspacing="0" cellpadding="0"> 
<tbody> 
<tr> 
<td><!--Privacy Policy-->{{widget type="cms/widget_page_link" template="cms/widget/link/link_block.phtml" page_id="63"}}</td> 
<td style="padding: 0 12px;">|</td> 
<td><!--FAQ-->{{widget type="cms/widget_page_link" template="cms/widget/link/link_block.phtml" page_id="44"}}</td> 
<td style="padding: 0 12px;">|</td> 
<td><!--My Account--><a href="{{store url="customer/account"}}">My Account</a></td> 
<td style="padding: 0 12px;">|</td> 
<td><!--Contact Us-->{{widget type="cms/widget_page_link" template="cms/widget/link/link_block.phtml" page_id="45"}}</td> 
<td style="padding: 0 12px;">|</td> 
<td><!--Category Sitemap--><a href="{{store url='catalog/seo_sitemap/category/'}}">Category Sitemap</a></td> 
</tr> 
</tbody> 
</table> 
</center> 

这只是一种选择。

相关问题