link_to_remove_tag
该 helper 用于生成一个带 href 属性 的 <a> 标签,,用于跳转到当前所在的分类列表页,新页面会过滤显示 url 上携带的标签的产品,同时排除传入的 标签的产品。
目前该 helper 仅支持分类列表页使用。 其他页面不支持。
参数
tag{String}产品类型, 必填hash.text{String}text 用于生成a标签显示内容文案,如果传入非string 会默认转换成空字符串[attribute]{Object}form html 的属性,可选, 属性组(除href) 格式: class="_class"returns{String}html
用法
{{ link_to_remove_tag tag [attribute] }}
例子
{{#each collection.all_tags as |tag|}}
{{#if (contains ../current_tags tag) }}
{{ tag }}
{{else}}
{{ link_to_remove_tag tag class="link-class" title=tag text=tag }}
{{/if}}
{{/each}}
这篇文章对你有帮助吗?
SHOPLINE