22-07-2025 16:32:11

DropMenu Examples

The following examples cover usage of the default Navigation/Site Map snippet. It is highly customizable and can build virtually any type of CSS-stylable menu system. Drop Menu can be called multiple times on a page.

Examples

The styling you see for the main navigation in the sidebar on this default template is a simple indented list. It supports many things "out of the box", including:

  • No links built for pages without content by default. These are great for creating "category" navigation headers.
  • Unpublished pages and pages with Show In Menu unchecked do not show up by default in your menus (but this can be overridden).
  • Pages that you are currently on recieve a class of "here" by default and are no longer built as links.
  • A class of "here" is also added to each LI element back up the "document heirarchy" by default.
  • Very simple CSS styling.
[!DropMenu!] #sidebar ul { padding: 5px 20px 1em; margin: 0 0 1em -5px; } #sidebar ul ul { margin-bottom: 0; border-bottom: 1px solid #ddd; } #sidebar ul ul ul { border-bottom: none; margin-bottom: 0; } #sidebar ul li ul li { background: url(images/tictac_green.gif) no-repeat 0 6px; }

The call for the sitemap found on the 404 page is only slighly different. It adds one parameter in order to show the description along with the page names/links:

[!DropMenu? &showDescription=`1`!]
 

Warning: Cannot modify header information - headers already sent by (output started at /mnt/133/sda/4/2/goult/manager/includes/document.parser.class.inc.php:442) in /mnt/133/sda/4/2/goult/manager/includes/document.parser.class.inc.php on line 405
MODx Content Manager »

« MODx Parse Error »

MODx encountered the following error while attempting to parse the requested resource:
« PHP Parse Error »
 
PHP error debug
  Error: Cannot modify header information - headers already sent by (output started at /mnt/133/sda/4/2/goult/manager/includes/document.parser.class.inc.php:442) 
  Error type/ Nr.: Warning - 2 
  File: /mnt/133/sda/4/2/goult/manager/includes/document.parser.class.inc.php 
  Line: 405 
  Line 405 source: header($header);  
 
Parser timing
  MySQL: 0.0148 s s(12 Requests)
  PHP: 1.7963 s s 
  Total: 1.8111 s s