【问题标题】:docpad plugin-tagging Why lists all the tags?docpad plugin-tagging 为什么列出所有标签?
【发布时间】:2013-05-06 06:13:53
【问题描述】:

为什么要列出所有tags

I use:

<div class="tags">
  <ul>
    <% for tag, item of @getTagCloud(): %>
        <li><a class="tag_item" href="<%= item.url %>" data-tag-count="<%= item.count %>" data-tag-weight="<%= item.weight %>"><%= item.tag %> (<%= item.count %>)</a></li>
    <% end %>
  </ul>
</div>

如何显示特定页面的标签?

【问题讨论】:

    标签: tags tagging docpad


    【解决方案1】:
    <div class="tags">
      <ul>
        <% for tag in @document.tags: %>
          <li><a class="tag_item" href="<%= @getTagUrl(tag) %>"><%= tag %></a></li>
        <% end %>
      </ul>
    </div>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-09-15
      • 2012-08-07
      • 2017-09-18
      相关资源
      最近更新 更多