Ticket #891 (closed enhancement: fixed)

Opened 15 months ago

Last modified 10 months ago

Menu configuration files

Reported by: DarTar Owned by: DarTar
Priority: normal Milestone: 1.2
Component: unspecified Version: 1.1.6.7
Severity: normal Keywords: trunk-unported
Cc:

Description (last modified by BrianKoontz) (diff)

As per our discussion, I am introducing in 1.2 menu configuration files and a dedicated MakeMenu() method to parse them.

MakeMenu() looks for menu configuration files, loads them and parse them into unordered lists. Menu settings are currently stored in flat text files in a folder called config/. The file name (e.g. main_menu.inc) is used by MakeMenu() to identify the menu. To output the menu, simply call $this->MakeMenu('main_menu'); The file name can also be used in the stylesheet as an id for styling purposes (ul#main_menu). The suffix in the config files (.user, .admin or none) refers to the menu settings for the corresponding category of users (users with different privileges will see different menus).

Menu configuration files contain menu items in wiki markup and separated by new lines. When rendered, each item is formatted and embedded in a <li>. Menu items can consists of text, links, actions (in particular menulets, see #11).

To do

  • setup (attempt to import existing settings on upgrade)

References

Related tickets

Change History

Changed 15 months ago by DarTar

  • owner changed from unassigned to DarTar
  • status changed from new to assigned

(In [1375]) First draft of support code for menus: new MakeMenu() method, new folder with menu settings (supporting menulets). Changes applied to templates. Installer and config files will need to be updated. First draft of alternate theme called "light" (CSS and images will need to be moved to theme folder): test by setting stylesheet to "light.css" in config file. refs #6 #11 and #868

Changed 15 months ago by DarTar

  • description modified (diff)

Changed 15 months ago by DarTar

  • description modified (diff)

Changed 15 months ago by DarTar

(In [1379]) Adding missing menulets for footer menu, refs #11 and #891

Changed 15 months ago by DarTar

(In [1383]) Adding missing menulet for footer menu, refs #11 and #891

Changed 15 months ago by DarTar

(In [1384]) Displaying search field on main menu, refs #11 and #891

Changed 15 months ago by DarTar

(In [1385]) New menulets, refs #11 and #891

Changed 15 months ago by DarTar

(In [1390]) New menulets, refs #11 and #891

Changed 14 months ago by DarTar

(In [1412]) Adding "who am I" menulet, refs #6 #11 and #891

Changed 14 months ago by DarTar

(In [1416]) Removing hardcoded strings from whoami menulet, changing menu config settings accordingly (thanks MasinAlDujaili for the heads up), refs #11 and #891

Changed 13 months ago by BrianKoontz

(In [1420]) Attempt to import existing navlinks on upgrade; remove deprecated config params. Refs #891.

Changed 13 months ago by BrianKoontz

  • status changed from assigned to testing
  • description modified (diff)

Changed 13 months ago by DarTar

(In [1428]) Changed wording to avoid potential confusion, refs #11 and #891

Changed 13 months ago by DarTar

Brian, I tested navlinks import on a 1.1.6.7->1.2 upgrade, works great, thanks! Two minor issues:

  • there is an extra newline at the end of the generated menu settings file that should be trimmed to avoid an empty <li>
  • we may want to strip from the imported links the line matching $this->root_page (e.g. HomePage) that had already been removed from previous menus

Changed 13 months ago by DarTar

(In [1431]) Removing HomePage link from default menu config files, refs #868 and #891

Changed 13 months ago by DarTar

(In [1432]) Removing trailing space from menu config files, refs #891 and #868

Changed 13 months ago by DarTar

(In [1433]) Changed menulet order in main menu, refs #891 and #868

Changed 13 months ago by DarTar

(In [1443]) homepage link menulet, refs #11 and #891

Changed 13 months ago by DarTar

(In [1444]) patch for homepage link menulet, refs #11 and #891

Changed 12 months ago by BrianKoontz

  • description modified (diff)

Changed 12 months ago by BrianKoontz

  • status changed from testing to commit

Tested with #11.

Changed 12 months ago by BrianKoontz

  • status changed from commit to closed
  • resolution set to fixed

Changed 12 months ago by BrianKoontz

  • keywords trunk-unported added

Changed 10 months ago by DarTar

(In [1517]) Removing login menulet (as it doesn't seem to be needed), changing default menu config, refs #933 and #891

Changed 10 months ago by DarTar

(In [1518]) Adding "menu" class to lists generated by MakeMenu() to simplify styling, refs #891 and #912

Note: See TracTickets for help on using tickets.