murph-doc/docs/tree.md
2021-05-30 20:36:00 +02:00

1.5 KiB

Tree manager

Murph manages contents this way:

  • You define navigations
  • For each navigation, you define menus
  • For each menu, you define elements (nodes)
  • and for each element, you define:
    • an optional page
    • the routing
    • some attributes
    • a sitemap configuration

## Navigation

To create a navigation, go to Navigations and click on New. Then fill the form and save.

  • The label is the label displayed whenever necessary (eg: Example)
  • The locale is the language used in the content (eg: en)
  • The code is a unique technical identifier useful in templating, routing and settings (eg: example_en)
  • The domain defines the main domain used to access the navigation (eg: example.com)
  • Additional domains are additional domains used to access the navigation (eg: www.example.com). You can specify regular expression to match all that you want

If several navigations share the same domain, then the locale will by used to prefix routes. But if a navigation uses a single domain then the local will not prefix routes.

## Menu

To create a menu, go to Trees, select the navigation and click on Add a menu. Then fill the form and save.

  • The label is the label displayed whenever necessary (eg: Top menu)
  • The code is an unique technical identifier (in the given navigation) and it is useful in templating, routing and settings (eg: top)

When a menu is created then an element is automatically generated.