Introduction

Introduction

Introduction -- Menu structure and supported output modes

Menu hash structure

The menu structure is defined by a multidimensional hash. This makes it quite easy to generate and traverse:
Each entry should have at least 'url' and 'title' keys and may also have 'sub' key containing the children of this entry. Note that keys in the entry arrays serve as node identifiers and should be unique.

The menu entries can also contain custom keys. If such keys are present, then they will be used by renderers in creating the output (this usually means that the content of such a key will be assigned to the template placeholder with the same name).

Supported output modes

HTML_Menu supports five output modes: 'tree' (default), 'rows', 'urhere', 'prevnext' and 'sitemap'. Lets use the array defined above as menu structure assuming that element 'Menu item 1.2' is currently active and try each menu type.

© Copyright 2003-2023 www.php-editors.com. The ultimate PHP Editor and PHP IDE site.