2
0

headers_and_footers.rst 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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. CodeRed CMS 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 CodeRed CMS.
  19. It is advisable to initially copy the contents of `CodeRed CMS navbar.html`_, but
  20. not necessary.
  21. .. _CodeRed CMS 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 CodeRed CMS.
  37. Similarly, it is advisable to initially copy the contents of `CodeRed CMS
  38. footer.html`_, but not necessary.
  39. .. _CodeRed CMS footer.html: https://github.com/coderedcorp/coderedcms/blob/dev/coderedcms/templates/coderedcms/snippets/footer.html