Structuring the page menu

In this recipe, we will discuss some guidelines about defining the tree structures for the pages of your website.

Getting ready

It is good practice to set the available languages for your website before creating the structure of your pages (although the Django CMS database structure also allows you to add new languages later). Besides LANGUAGES, make sure that you have CMS_LANGUAGES set in your settings. The CMS_LANGUAGES setting defines which languages should be active for each Django site, as follows:

# conf/base.py or settings.py # ... from __future__ import unicode_literals gettext = lambda s: s LANGUAGES = ( ("en", "English"), ("de", "Deutsch"), ("fr", "Français"), ("lt", "Lietuvių kalba"), ) CMS_LANGUAGES = { "default": ...

Get Web Development with Django Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.