| Index: templates/product-home.tmpl |
| diff --git a/templates/product-home.tmpl b/templates/product-home.tmpl |
| index a25cb11d211e20dd49287ad1359f6fd301c60560..0a494b364e3380242719075ae840ede2a1c94b05 100644 |
| --- a/templates/product-home.tmpl |
| +++ b/templates/product-home.tmpl |
| @@ -12,7 +12,9 @@ |
| </h1> |
| </header> |
| - {% set popular_topics = get_pages_metadata({ "product_id": product_id, "template": "article", "popular": "true" }) %} |
| + {% set product_topics = get_pages_metadata()|selectattr("product_id", "equalto", product_id) |
| + |selectattr("template", "equalto", "article")|list %} |
| + {% set popular_topics = product_topics|selectattr("popular", "equalto", "true")|list %} |
| {% if popular_topics %} |
| <section class="card {{ product_id }}-card section"> |
| <h2 class="card-heading has-pre-icon"> |
| @@ -34,7 +36,7 @@ |
| <div class="row"> |
| {% for category in product.help_categories %} |
| - {% set articles = get_pages_metadata({ "product_id": product_id, "template": "article", "category": category.name }) %} |
| + {% set articles = product_topics|selectattr("category", "equalto", category.name)|list %} |
| {% if articles and category.name != 'Popular Topics' %} |
| <section class="section column one-half"> |
| <h2 class="h4 has-pre-icon"> |