Magento如何从静态块/页面按ID链接到类别
问题描述:
我正在寻找使用category id
从静态块链接到类别的方法.有什么想法吗?
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.
目前,我可以执行类似<a href="{{store url="category-i-want.html"}}">
的操作,但这很难做到.
At the moment I can do something like <a href="{{store url="category-i-want.html"}}">
, but this is hardly robust.
答
使用类别链接窗口小部件内联链接代码:
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"}}