Skip to content

Commit

Permalink
add tags to webcrawler view of a topic in an ItemList
Browse files Browse the repository at this point in the history
  • Loading branch information
nlalonde committed Feb 6, 2017
1 parent 9ec0004 commit ece979e
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions app/views/topics/show.html.erb
Expand Up @@ -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>
Expand Down

0 comments on commit ece979e

Please sign in to comment.