Revision aa8ce0dc
b/cloudcmsblog/models.py | ||
---|---|---|
176 | 176 |
else: |
177 | 177 |
return BLOG_URL + r |
178 | 178 |
|
179 |
def back_url(self): |
|
180 |
AC = Page.content_type_for(ApplicationContent) |
|
181 |
blog_block = AC.objects.filter(urlconf_path="cloudcmsblog")[0] |
|
182 |
BLOG_URL = blog_block.parent.get_navigation_url() |
|
183 |
return BLOG_URL |
|
184 |
|
|
179 | 185 |
|
180 | 186 |
# Feincms navigation extension |
181 | 187 |
class BlogCategoriesNavigationExtension(NavigationExtension): |
b/cloudcmsblog/templates/cloudcmsblog/detail.html | ||
---|---|---|
21 | 21 |
{% endif %} |
22 | 22 |
<div class="content"> |
23 | 23 |
{% for content in entry.content.main %} |
24 |
{{ content.render }} |
|
24 |
{{ content.render }}
|
|
25 | 25 |
{% endfor %} |
26 | 26 |
</div> |
27 |
|
|
28 |
<div class="bottom-content"> |
|
29 |
<a href="{{ entry.back_url }}">{% trans "Back to blog" %}</a> |
|
30 |
</div> |
|
27 | 31 |
</div> |
28 | 32 |
{% endfragment %} |
29 | 33 |
|
Also available in: Unified diff