Revision 0ab488b2
b/cloudcms/templates/cms/pages/faq.html | ||
---|---|---|
1 |
{% extends "cms/pages/twocolwide.html" %}
|
|
1 |
{% extends "cms/pages/onecol.html" %}
|
|
2 | 2 |
{% load applicationcontent_tags feincms_page_tags %} |
3 | 3 |
|
4 | 4 |
|
5 |
{% block page.maincol %}
|
|
5 |
{% block page.bottom_right.content %}
|
|
6 | 6 |
{% if request|has_fragment:"maincol" %} |
7 | 7 |
{% get_fragment request "maincol" %} |
8 | 8 |
{% else %} |
... | ... | |
10 | 10 |
{% endif %} |
11 | 11 |
{% endblock %} |
12 | 12 |
|
13 |
{% block page.sidecol %}
|
|
13 |
{% block page.bottom_left.content %}
|
|
14 | 14 |
{% if request|has_fragment:"sidecol" %} |
15 | 15 |
{% get_fragment request "sidecol" %} |
16 | 16 |
{% else %} |
b/cloudcmsfaq/templates/cloudcmsfaq/archive.html | ||
---|---|---|
1 | 1 |
{% load applicationcontent_tags pagination_tags i18n %} |
2 | 2 |
|
3 |
<div class="faqs">
|
|
3 |
<div class="faq"> |
|
4 | 4 |
{% for category in categories %} |
5 | 5 |
<div class="faq-category"> |
6 | 6 |
<h3>{{ category.translation.title }}</h3> |
7 |
<ul class="questions">
|
|
8 |
{% for question in category.faqs.active %}
|
|
9 |
<li> |
|
10 |
<a href="{{ question.get_absolute_url }}">{{ question.title }}</a>
|
|
7 |
<ul> |
|
8 |
{% for q in category.faqs.active %} |
|
9 |
<li {% if q == question %}class="current"{% endif %}>
|
|
10 |
<a href="{{ q.get_absolute_url }}">{{ q.title }}</a>
|
|
11 | 11 |
</li> |
12 | 12 |
{% endfor %} |
13 | 13 |
</ul> |
b/cloudcmsfaq/templates/cloudcmsfaq/detail.html | ||
---|---|---|
1 | 1 |
{% load applicationcontent_tags i18n %} |
2 | 2 |
|
3 |
{% fragment request "sidecol" %} |
|
4 |
{% include "cloudcmsfaq/archive.html" %} |
|
5 |
{% endfragment %} |
|
6 |
|
|
3 | 7 |
{% fragment request "maincol" %} |
4 | 8 |
<div class="question"> |
5 | 9 |
<h2>{{ question.title|upper }}</h2> |
... | ... | |
9 | 13 |
{% endfor %} |
10 | 14 |
</div> |
11 | 15 |
<div class="bottom-content backlink"> |
12 |
<a href="{{ question.back_url }}">{% trans "Back to FAQ's" %}</a> |
|
16 |
<a href="{{ question.back_url }}">{% trans "< Back to FAQ's" %}</a>
|
|
13 | 17 |
</div> |
14 | 18 |
</div> |
15 |
{% endfragment %} |
|
16 |
|
|
17 |
{% if entry.content.sidebar|length > 0 %} |
|
18 |
{% fragment request "sidecol" %} |
|
19 |
{% for content in entry.content.sidebar %} |
|
20 |
{{ content.render }} |
|
21 |
{% endfor %} |
|
22 |
{% endfragment %} |
|
23 |
{% endif %} |
|
19 |
{% endfragment %} |
b/cloudcmsfaq/views.py | ||
---|---|---|
56 | 56 |
Display detailed question. |
57 | 57 |
""" |
58 | 58 |
entry = Question.objects.get(slug=slug) |
59 |
categories = Category.objects.filter(pk=entry.category.pk) |
|
59 | 60 |
return direct_to_template(request, |
60 |
"cloudcmsfaq/detail.html", {'question': entry}) |
|
61 |
"cloudcmsfaq/detail.html", {'question': entry, |
|
62 |
'categories': categories}) |
|
61 | 63 |
|
Also available in: Unified diff