Magento How to link to category by id from static block/page

拥有回忆 提交于 2019-12-05 00:07:50

问题


I'm looking to link to a category from a static block using the category id. Any thoughts?

I've done the usual searches, but to no avail.

At the moment I can do something like <a href="{{store url="category-i-want.html"}}">, but this is hardly robust.


回答1:


Use the category link widget inline link code:

{{widget type="catalog/category_widget_link" anchor_text="Displayed Text" title="Title attribute text" template="catalog/category/widget/link/link_block.phtml" id_path="category/22"}}


来源:https://stackoverflow.com/questions/10317719/magento-how-to-link-to-category-by-id-from-static-block-page

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!