headers_and_footers.rst 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. Customize Navbar and Footer
  2. ===========================
  3. Navbar
  4. ------
  5. The navbar (also known as Navigation Bar, Header, or Menu) is a shared piece
  6. navigation. Wagtail CRX shows an area for the navbar at the top of most pages on
  7. the site. The logo and style of the navbar can be customized under **Settings >
  8. Layout**. The links shown in the navbar can be customized by creating a "Navbar"
  9. snippet under **Snippets > Navbar**.
  10. .. note::
  11. Each Navbar snippet is rendered sequentially in the navbar area. This currently
  12. does not support multi-site, i.e. all Navbar snippets are present on all sites.
  13. Customizing the design of the stock navbar can be accomplished by baked in
  14. Django template overrides.
  15. Create a ``templates\coderedcms\snippets`` directory in your project,
  16. most likely in the ``website`` directory.
  17. In that directory create a file called ``navbar.html``. This file will then
  18. override the ``navbar.html`` file included with Wagtail CRX.
  19. It is advisable to initially copy the contents of `Wagtail CRX navbar.html`_, but
  20. not necessary.
  21. .. _Wagtail CRX navbar.html: https://github.com/coderedcorp/coderedcms/blob/dev/coderedcms/templates/coderedcms/snippets/navbar.html
  22. Footer
  23. ------
  24. The footer is a shared piece of content shown at the bottom of every page on the
  25. site. Content can be added to the footer by creating a "Footer" snippet under
  26. **Snippets > Footer**.
  27. .. note::
  28. Each Footer snippet is rendered sequentially in the footer area. This
  29. currently does not support multi-site, i.e. all Footer snippets are present
  30. on all sites.
  31. Customizing the design of the sock footer can be accomplished similarly to the
  32. navbar, by overriding the Django template.
  33. Create a ``templates/coderedcms/snippets/`` directory in your project,
  34. most likely in the ``website`` directory.
  35. In that directory create a filed named ``footer.html``. This file will then
  36. override the ``footer.html`` file included with Wagtail CRX.
  37. Similarly, it is advisable to initially copy the contents of `Wagtail CRX
  38. footer.html`_, but not necessary.
  39. .. note::
  40. You can now create more than one navbar menu or footer and choose which ones to render on your site. In **Settings > CRX Settings**,
  41. select your navbars in **Site Navbars**. Select your footers in **Site Footers**. The Site Navbar Layout includes settings for the whole
  42. navbar, while the Site Navbar chooser allows you to choose which menu you want for your site. This features allows you to
  43. select a different navbar/footer per site in a multisite installation OR render several navbars/footers in selected order
  44. on a single site.
  45. .. _Wagtail CRX footer.html: https://github.com/coderedcorp/coderedcms/blob/dev/coderedcms/templates/coderedcms/snippets/footer.html