Search code examples
tagstaggingdocpad

docpad plugin-tagging Why lists all the tags?


Why lists all the 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>

How to display a specific page tags?


Solution

  • <div class="tags">
      <ul>
        <% for tag in @document.tags: %>
          <li><a class="tag_item" href="<%= @getTagUrl(tag) %>"><%= tag %></a></li>
        <% end %>
      </ul>
    </div>