Patrick's CMS

The navigation menu

The menu can be either alphabetical or ordered manually. Select in Setup. Either way, the home page is always first the contact page (if used) is last.

The menu text is (and must be) exactly the same as the page filenames listed under Existing pages. When the menu is displayed the text is automatically capitalised and hyphens are replaced with a space.

'Get the menu' and 'Save the menu'

The menu can be edited manually to change the order or to add/remove menu items but it will display alphabetically if the alphabetical option is selected. Otherwise it will display in the order listed by 'Get the menu' in admin.

The navigation menu can be edited so the text displayed is whatever you want. In the 'Pages' section of Admin click 'Get the menu' and add the text enclosed in square brackets immediately after the page title text, as in the following example (screenshot):

Then save the menu. In the example above the menu text for the page titled 'about' will be displayed as 'Menu Text' in the navigation menu. You can choose the menu text (known as 'anchor text') for all the pages in the navigation menu.

The page names in the menu are created automatically when a page is created or edited and must match the page title (URL) exactly for the navigation menu to work. If a page name is preceded by a # hash symbol the page will not appear in the navigation menu (and vice versa). The # hash symbol can added or removed manually with 'Get the menu' and 'Save the menu'.

If you accidentally change a page name in the menu you can restore it by manually deleting it from the menu file ('Get the menu' and 'Save the menu') then updating the page with a plus + symbol on the first line of a page.

For info: the menu file is /inc/inmenu.txt. The file is not in the download but is generated the first time a new page is created.

The navigation menu is best kept without too many items. The home page, search and email (if used) are there by default so there is room for only two or three more, depending on the number of words, or it will spread on to two lines and that's no good. However, any number of navigation links can be added to a page named menu or information (or whatever you like), then that page is added to the navigation menu.

This limitation (it isn't really a limitation) is by design, bearing in mind the increased use of mobile phones for web browsing and benefit of everything in a single column (no sidebar).


Page last modified: 03 December, 2022