ImCMS
6.0.0-beta18-docs
  • Overview of ImCMS
  • Setup
  • Tutorial
  • Design
  • API-Documentation
  • Content Management
  • Advanced Configuration
  • Image Archive
  • BankId
  • User Documentation
  • Developer Documentation
    • Design
      • Template
      • Tags
        • Admin Related Tags
        • Text Tag
        • Image Tag
        • Menu Related Tags
        • Loop Related Tags
        • Metadata Tag
        • TemplateCSS Tag
    • System Configuration
    • Custom Admin Tab
    • Cache
    • Storage
    • Image Processing
    • Apache Solr
    • API
ImCMS
  • Developer Documentation
  • Design
  • Tags
  • Menu Related Tags
  • Edit on GitHub

Menu Related Tags

Menu Related tags represents the Menu editor in Edit mode and the content from the editor in Preview mode and on a published page.

See also

Read also the Menu editor article.

Menu Tag

Opens/closes the body of the menu.

Available list of tag attributes:

Attribute

Type

Description

index

Integer

id of the current text (recommended version).

document

Integer

id of the document from which to take the text. This text cannot be changed on this page.

label

String

the text editor title (visible to the admin).

showlabel

Boolean

true (default) - show the label, false - don’t show label.

pre

String

text or html before the content (if the content is not empty).

post

String

text or html after the content (if the content is not empty).

showMode

String

Possible values:

  • absence of this attribute/default - the editor is highlighted in Edit mode.

  • small - the editor in Edit mode looks like in the preview, but after clicking it opens the normal editor.

Warning

Manu tag must have index attribute!

MenuLoop Tag

Opens/closes a loop of elements, specified inside the menu or menuLoop tags.

Inside menuLoop tag you can use following variable:

  • menuItem - MenuItemDTO - represents the current menu item.

  • isCurrent - Boolean - represents a boolean whether the current item is the current document.

  • hasChildren - Boolean - represents a boolean whether the current item has nested elements.

  • menuItems - List<MenuItemDTO> - represents nested elements of the current menu item.

MenuItemLink Tag

Represents a link to a document, specified inside the menuLoop tag. You need to specify the text inside this tag.

Available list of tag attributes:

Attribute

Type

Description

classes

String

specify classes for <a> (space separated).

Usage example

<imcms:menu index='1' pre="<div>" post="</div>" label="Test menu tag">
    <div class="imcms-demo-page__menu imcms-demo-menu">
        <imcms:menuLoop>
            <div class="imcms-demo-menu__menu-item imcms-demo-menu-item${hasChildren?' imcms-demo-menu__menu-item--parent':''}${isCurrent?' imcms-demo-menu__menu-item--active':''}">
                <imcms:menuItemLink classes="imcms-demo-menu-item__text">${menuItem.title}</imcms:menuItemLink>
                <imcms:menuLoop>
                    <div class="imcms-demo-menu__menu-items imcms-demo-menu__menu-items--child">
                        <div class="imcms-demo-menu__menu-item">
                            <imcms:menuItemLink
                                    classes="imcms-demo-menu-item__text">${menuItem.title}</imcms:menuItemLink>
                        </div>
                    </div>
                </imcms:menuLoop>
            </div>
        </imcms:menuLoop>
    </div>
</imcms:menu>
Previous Next

© Copyright 2015-2022, ImCodePartnerAB. Revision 07c6cb49. Last updated on Nov 01, 2023.

Built with Sphinx using a theme provided by Read the Docs.