Skip to content

Instantly share code, notes, and snippets.

@DeskWOW
Last active August 29, 2015 13:56
Show Gist options
  • Save DeskWOW/8828669 to your computer and use it in GitHub Desktop.
Save DeskWOW/8828669 to your computer and use it in GitHub Desktop.
You can use this technique to give the impression of "categories of topics". For every category, you'll do a for loop of all topics and render the ones that have the proper category code in their topic description (as defined by you).
<h2>Support Center Categories</h2>
<h3>Quick Start Guide</h3>
{% for topic in topics %}
<ul>
{% if topic.desc contains "[QSG]" %}
<li><a href="{{ topic.public_url }}">{{ topic.name }}</a> (#{{ topic.id }})</li>
{% endif %}
</ul>
{% endfor %}
<hr>
<h3>Advanced User Guides</h3>
{% for topic in topics %}
<ul>
{% if topic.desc contains "[AUG]" %}
<li><a href="{{ topic.public_url }}">{{ topic.name }}</a> (#{{ topic.id }})</li>
{% endif %}
</ul>
{% endfor %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment