How to do it...

The page navigation is set in tree structures. The first tree is the main tree, and, contrary to the other trees, the root node of the main tree is not reflected in the URL structure. The root node of this tree is the home page of the website. Usually, this page has a specific template, where you add the content aggregated from different apps, for example, a slideshow, actual news, newly registered users, the latest tweets, or other latest or featured objects.

For a convenient way to render items from different apps, check the Creating a template tag to a QuerySet in a template recipe in Chapter 5, Custom Template Filters and Tags.

  1. If your website has multiple navigation types, such as a top, meta, and footer navigation, give an ID to the root node of each tree in the Advanced Settings of the page. This ID will be used in the base template with the {% show_menu_below_id %} template tag. The Advanced Settings will look something like the following:

You can read more about this and other menu-related template tags in the official documentation at http://docs.django-cms.org/en/latest/reference/navigation.html.
  1. The first tree defines the main structure of the website. If you want a page under the root-level URL (for example, /en/search/ but not /en/meta/search/), put this page under the home page. If you don't want a page to be shown in the menu, as it will be linked from an icon or widget, just hide it from the menu.
  2. The footer navigation usually shows items different from the top navigation, with some of the items being repeated. For example, the page for developers will only be shown in the footer, whereas the page for news will be shown in both the header and footer. For all of the repeated items, just create a page with the Redirect setting in the advanced settings of the page and set it to the original page in the main tree. By default, when you create a secondary tree structure, all pages under the root of that tree will include the slug of the root page in their URL paths. If you want to skip the slug of the root in the URL path, you will need to set the Overwrite URL setting in the advanced settings of the page; for example, the developers page should be under /en/developers/, not /en/secondary/developers/.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.135.216.174