Pārlūkot izejas kodu

write documentation: menus

tags/v1.1
Dominik Schmidt-Philipp pirms 4 gadiem
vecāks
revīzija
06f72e7434
1 mainītis faili ar 31 papildinājumiem un 0 dzēšanām
  1. +31
    -0
      doc/menus.md

+ 31
- 0
doc/menus.md Parādīt failu

@@ -0,0 +1,31 @@

Menus in freaCMS
================

Menus generally follow the form

<ul>
<li class="">
<a href="" class="">NAME</a>
<SUBMENU />
</li>
</ul>

they get configured by defining their name plus language inside the global nav array:

[nav.MENU_NAME.LANG]
directory.index=NAME
directory.sub1=NAME
directory.sub2=NAME
another_directory=NAME
'index' makes it possible assign a name to a site with sub pages. Therefore 'index' is not a valid foldername inside a path to a page.
for links, that point outside of the website (i.e. external links) inside a menu, the entry becomes:

some_unique_key=NAME := URL
this makes it impossible to use the string ":=" inside a menu item name. Earlier versions of freaCMS did not have this limitation. It was not possible to mix external and internal links in the same menu though. And the definition was hardcoded. I consider this new approach better.



Notiek ielāde…
Atcelt
Saglabāt