Programming language e.g. PHP, JAVASCRIPT, coding, web developing hints and skills applying on mobile device e.g. iphone
2012/03/21
Adding/Removing Items from header top links
To edit top links content, we need to access the xml files
1. app/design/frontend/default/default/layout/checkout.xml
2. app/design/frontend/default/default/layout/customer.xml
[code]
<!--
Default layout, loads most of the pages
-->
<default>
<!-- Mage_Customer -->
<reference name="top.links">
<action method="addLink" translate="label title" module="customer"><label>My Account</label><url helper="customer/getAccountUrl"/><title>My Account</title><prepare/><urlParams/><position>10</position></action>
<action method="addLink" translate="label title" module="customer"><label>Contact
Us</label><url>contacts</url><title>Contact
Us</title><prepare/><urlParams/><position>999</position></action>
</reference>
</default>
[/code]
2011/03/09
DRUPAL 7中能夠TRIM Teaser的地方
今日搵了很久, 為何在content type 的teaser選了trim length, 但frontend 仍然不見效果..
原來我除了在content type trim了,還在 views 裏的"field" 再trim了一次, 例如在content type set 了length 300: , 之後pass到view裏即使set 到trim 350也沒有效果, 因為一早被content type的override了!
當一個node 經panels, views ,block 顯示既時候, 真的要set好rule 搞清楚次序, 因為太多setting 可以互相override, 見一個set一次的話之後debug就頭痛了..
關於module 互相override的次序, 其實都可以check得番, 就係去database 睇"system"既table, 睇番你想睇既module, 留意weight, 通常會係0, views既default 係10 , 通常taxonamy, node 等等都會被view override
但對於node .tpl file 同view 比較, 好似node .tpl file 永遠係最高prority, 這個有待確認
原來我除了在content type trim了,還在 views 裏的"field" 再trim了一次, 例如在content type set 了length 300: , 之後pass到view裏即使set 到trim 350也沒有效果, 因為一早被content type的override了!
當一個node 經panels, views ,block 顯示既時候, 真的要set好rule 搞清楚次序, 因為太多setting 可以互相override, 見一個set一次的話之後debug就頭痛了..
關於module 互相override的次序, 其實都可以check得番, 就係去database 睇"system"既table, 睇番你想睇既module, 留意weight, 通常會係0, views既default 係10 , 通常taxonamy, node 等等都會被view override
但對於node .tpl file 同view 比較, 好似node .tpl file 永遠係最高prority, 這個有待確認
2011/03/01
Editing Magento’s Top Links
It looks like in 1.4 they changed the wishlist.xml – just replace:
with:
Because of the “remove” global effect, if you want to re-add the wishlist link somewhere else, you need to create a custom block. I just copy it from wishlist.xml, change the name attribute of the block, and place it in my local.xml file.
<action method="removeLinkByUrl"><url helper="wishlist/"/></action> |
<remove name="wishlist_link"/> |
<reference name="WHEREVER"> <block type="wishlist/links" name="wishlist_link_custom"> <action method="addWishlistLink"></action> </block> </reference> |
訂閱:
文章 (Atom)