# Block "Tree-like menu (menutree)"

Block "Tree-like menu (menutree)" allows you to create the extended menu with nested structure. Below you will find some basic information.

## How to start?

To **add the first item** to the menu, click link "**Add**". You will get a form in which you must enter the name of the item and possibly other parameters (title, address, css class). At the top of the form you can find drop-down list with installed languages, which allows to switch between languages.

While adding a new block, you can **import** an existing menu (supported blocks: "menu", "extmenu", "menutree" and "dynamenu"). To this purpose choose a block from the drop-down list.

## The basic options

To **move** an item, simply **grab a folder icon** and drop it on desired position.

**Click the name** of an item, to view a **context menu**, which includes the following options:

*   **Edit**: opens the edit form
*   **Delete**: removes the selected element and all its subelements
*   **Add new...** 
    *   **before**: opens a create form and adds the new item before the selected element
    *   **after**: opens a create form and adds the new item after the selected element
    *   **as child**: opens a create form and adds the new item as a child of the selected element
*   **Expand/Collapse this node**: expands or collapses the selected node
*   **Deactivate/Activate**: turns on or off the selected element (and all its subitems) for the current language
*   **State** 
    *   **Activate for all languages**: turns on the selected element (and all its subitems) for all the languages
    *   **Deactivate for all languages**: turns off the selected element (and all its subitems) for all the languages

## Multilingual options

If the site has many languages installed - the menu will include all language versions. Each menu element can a have separated name and title for each language. The URL address and css class may (but not need) be common for all languages.

The list of available languages is displayed above the menu (current language is marked). By clicking any language name you can change the displayed language.

## Dynamic elements

Dynamic elements are menutree plugins that allows the use of automatically generated list in the menu. It may be a list of all modules, the list of categories, etc.

Dynamic elements are inserted in the same way as any other element of the menu. The only difference is that the url must use proper syntax, which looks like: (ext:Modulename:PluginName:AdditionalParams). The list generated by the plugin replaces the original menu item.

### Adminlinks

This plugin generates a list of admin modules - similar to adminnav block.

    {ext:Blocks:adminlinks[:[flat,category]]}

*   Last parameter is optional. It can be flat and/or category separated by a comma. 
    *   **flat** - will add the admin links in the current menu. Without flat the links are grouped one level down.
    *   **category** - additionally groups the admin links by their category.
*   You can combine **flat** and **category** to have the category links added in the current menu.

### Content pages

Plugin for Content module. This plugin generates a list of Content pages.

    {ext:Blocks:Content:[groupby=page&parent=1]}

*   Parameters in square brackets are optional: 
    *   **Groupby** - allows to choose grouping method, allow values are menuitem (default) or page.
    *   **Parent** - id of parent node - this allows to get specified node of content pages.

Note that this plugin considers if pages are enabled for display in menu. So if you wonder why certain items do not appear, look if you enabled this option at corresponding Content pages.

### Modules list

This plugin generates a list of installed modules - similar to adequate option in standard menu.

    {ext:Blocks:modules:[flat]}

Parameter **flat** is optional and allows you to disable links grouping.

### News module

Plugin for News module, generates a list of useful links to module and a list of categories.

    {ext:Blocks:news:[flat=BOOL&links=view,add,cat,arch|ALL]}

*   Parameters in square brackets are optional:
*   **Flat** - true or false, default is false, the parameter allows you to disable links grouping
*   **Links** - a list of items to be displayed - default is all (ALL), available components are: 
    *   **View** - link to main News view
    *   **Add** - link to Submit News form
    *   **Cat** - list of News categories
    *   **Arch** - link to archive
*   Links given in the **links** parameter are displayed in the order in which they are provided.

### Userlinks

This plugin generates basic links for users.

For logged-in users: Your Account, Profile, Private messages, Logout.

For not logged users: Your Account, Login, Register, Lost password.

    {ext:Blocks:userlinks:[flat]}

Parameter **flat** is optional and allows you to disable links grouping.