top.links.phtml in Magento can be safely deleted

Magento 的 default, modern, blank 等 templates 都带有一个文件 top.links.phtml (在 template/page/html),第一眼看上去都会认为它是页面右上角 My Account, My Wishlist, My Cart, Checkout, Log In 的模板,但其实 top links 和 footer links 用的是同一个模板,即 template/page/template/link.phtml。

没有任何地方引用到 top.links.phtml,删了它一点事也没有;如果加载它,反而会出错。我猜 Magento core developers 原想把 top links 和 footer links 做成不同的模板,后来合并了模板,忘了删除一个废弃的文件?

Leave a comment

Your email address will not be published. Required fields are marked *