add tags to webcrawler view of a topic in an ItemList

This commit is contained in:
Neil Lalonde 2017-02-06 18:10:42 -05:00
parent 9ec000407f
commit ece979efd1
1 changed files with 17 additions and 0 deletions

View File

@ -18,6 +18,23 @@
</div>
<% end %>
<% if SiteSetting.tagging_enabled %>
<% @tags = @topic_view.topic.tags %>
<% if @tags.present? %>
<div class='tags-list' itemscope itemtype='http://schema.org/ItemList'>
<% @tags.each do |tag| %>
<div itemprop='itemListElement' itemscope itemtype='http://schema.org/ListItem'>
<meta itemprop='url' content='<%= "#{Discourse.base_url}/tags/#{tag.name}" %>'>
<a href='<%= "#{Discourse.base_url}/tags/#{tag.name}" %>' itemprop='item'>
<span itemprop='name'><%= tag.name -%></span>
</a>
</div>
<% end %>
</div>
<% end %>
<% end %>
<%= server_plugin_outlet "topic_header" %>
<hr>