Cloudcmsfaq services as primary category
[snf-cloudcms] / cloudcmsfaq / templates / cloudcmsfaq / archive.html
index c640948..c8e3a44 100644 (file)
@@ -1,15 +1,23 @@
-{% load applicationcontent_tags pagination_tags i18n %}
+{% load applicationcontent_tags pagination_tags i18n cloudcms_tags %}
 
 <div class="faq">
-    {% for category in categories %}
+    {% for service in services %}
     <div class="faq-category">
-        <h3>{{ category.translation.title }}</h3>
+        <h2>{{ service.translation.title|upper }}</h2>
         <ul>
-            {% for q in category.faqs.active %}
-            <li {% if q == question %}class="current"{% endif %}>
-                <a href="{{ q.get_absolute_url }}">{{ q.title }}</a>
-            </li>
+            <li class="category">
+            {% for category, questions in service|get_service_faqs %}
+              <h3>{{ category.translation.title|upper }}</h3>
+              <ul>
+                {% for q in questions %}
+                  <li {% if q == question %}class="current"{% endif %}>
+                    <a href="{{ q.get_absolute_url }}">{{ q.title }}</a>
+                  </li>
+                  {% endfor %}
+                  <br />
+              </ul>
             {% endfor %}
+            </li>
         </ul>
     </div>
     {% endfor %}