Skip to content

Instantly share code, notes, and snippets.

@DeskWOW
Created December 30, 2013 15:04
Show Gist options
  • Save DeskWOW/8183108 to your computer and use it in GitHub Desktop.
Save DeskWOW/8183108 to your computer and use it in GitHub Desktop.
How to feature articles by article ID for support centers with its content segmented by topic description.
{% capture featured_force_article %}1227039,1227386{% endcapture %}
{% for topic in site.topics %}
{% if topic.desc == "force" or topic.desc == "all" %}
{% for article in topic.articles %}
{% capture current_article_id %}{{ article.id }}{% endcapture %}
{% if featured_force_article contains current_article_id %}
<li><a href="{{ article.public_url }}">{{ article.subject_plain }}</a></li>
{% endif %}
{% endfor %}
{% endif %}
{% endfor %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment