More Functionality
Additional PageContent fields and meta tags
Django CMS can manage additional page content and metadata. For example, the model Django CMS uses for PageContents provides a Description field (under 'advanced options').
To enable this change the SEO_FIELDS = False to True in cms_settings.py
To generate meta tags for your page based on the information in your SEO fields (Page Title, Keywords, Description, Page Topic), include something like this in the head of your template:
{% for tag in page.get_meta_tags %}
{{ tag }}
{% endfor %}
Setting available languages for PageContents
In settings.py, add the languages you want to be available as choices for PageContents, like this:
ugettext = lambda s: s
LANGUAGES = (
('cy', ugettext('Cymraeg')),
('en', ugettext('English')),
)
Automatic pagination
You can use Django template tags in any of your pages. django-cms
comes with built-in template tags. For example, you can use pagination
in your content by simply inserting {% cms_new_page %}.
One example of how to implement this:
{% if more_than_one_page %}
<div id="page_numbers">
{% for number in page_numbers %}
{% ifequal number page_number %} {{ number }}
{% else %}<a href="?page={{ number }}"> {{ number }} </a>
{%endifequal %}
{% endfor %}
</div>
{% endif %}
