Permalink
Browse files

comments for future on code, article tag list snippets

  • Loading branch information...
1 parent f5e09f2 commit 2ceede6bda33e5a2ac53ef6c1756ebade3ef33c4 @ryanpitts ryanpitts committed Feb 18, 2013
@@ -1,6 +1,9 @@
<span class="category">{% if article.article_type %}<a href="{{ url('article_list_by_category', article.article_type) }}">{{ article.get_article_type_display() }}</a>{% endif %}{% if article.tags.all().exists() %} <span class="tags">{% for tag in article.tags.all() %}<a href="{{ url('article_list_by_tag', tag.slug) }}">{{ tag }}</a>{% if not loop.last %} {% endif %}{% endfor %}</span>{% endif %}</span>
-{# TODO: enable support for split tag fields by switching to list code below
+{#
+
+ If we ever completely drop the original `tags` field, the code below will
+ generate the proper list of tags for an article object
<span class="category">{% if article.article_type %}<a href="{{ url('article_list_by_category', article.article_type) }}">{{ article.get_article_type_display() }}</a>{% endif %}{% if article.merged_tag_list %} <span class="tags">{% for tag in article.merged_tag_list %}<a href="{{ url('article_list_by_tag', tag.slug) }}">{{ tag }}</a>{% if not loop.last %} {% endif %}{% endfor %}</span>{% endif %}</span>
#}
@@ -1,6 +1,9 @@
{% if code.tags.all().exists() %}<span class="category">Tags <span class="tags">{% for tag in code.tags.all() %}<a href="{{ url('code_list_by_tag', tag.slug) }}">{{ tag }}</a>{% if not loop.last %} {% endif %}{% endfor %}</span></span> {% endif %}
-{# TODO: enable support for split tag fields by switching to list code below
+{#
+
+ If we ever completely drop the original `tags` field, the code below will
+ generate the proper list of tags for a code object
{% if code.merged_tag_list %}<span class="category">Tags <span class="tags">{% for tag in code.merged_tag_list %}<a href="{{ url('code_list_by_tag', tag.slug) }}">{{ tag }}</a>{% if not loop.last %} {% endif %}{% endfor %}</span></span> {% endif %}

0 comments on commit 2ceede6

Please sign in to comment.