Open the menu
    ```html

    Navigation Bar: Generate HTML Structure

    In the context menu of the Menu interface, there is the option “Generate Structure”. This option allows for the creation of a structure of channels and pages, within the channel where the navigation bar service instance is located, from an HTML.

    Features

    • It is an administration interface

    Screens

    Generate HTML Structure

    When this option is selected, a form is displayed for providing the HTML fragment that will be imported. The HTML Fragment field for import will initially be filled with the HTML contained in the page:holder where the interface instance is mounted. If it is not in a page:holder, it will initially be empty.

    The user can change the HTML fragment to be imported as desired, then must press the Next button to continue the import process or Cancel to cancel the process. After proceeding, a summary of the elements in the structure that will be created by importing the provided HTML will be displayed. The user can then click OK to proceed with the creation, or Cancel to cancel the operation.

    The import will take into account <ul> or <ol> elements and <li> for the purpose of identifying the elements that make up the menu and their respective hierarchy, as follows:

    • Each <ul> or <ol> element will be considered to represent a list of menu items, where these items have as parent the corresponding closest ancestor <li> of the <ul> or <ol>, if it exists, or that the items are at the root of the menu if such <li> does not exist.
    • Each <li> will be considered a menu item. The label of the item will be the text contained in the <li>, ignoring any content in <ul> or <ol> of this <li>. If the <li> has no text to be used as a label, it will be ignored.
    • If the html does not have a <ul> at the beginning but has several <li> elements at the root, treat the html as if it had <ul> at the beginning. This happens when the pageholder is in the ul.

    For each identified menu item according to the above rules, a channel and a child page of this channel will be created, both named the same as the label identified for the item. The created page will have the Hidden property enabled. Channels related to elements at the root of the menu will be created as children of the channel where the corresponding navigation bar service instance is located. Channels related to menu elements that have a parent will be created as children of the channel corresponding to their parent.

    Even if there is already a channel or page with the same path as that of a menu item, it will be created, which may result in channels or pages with the same name.

    Note that the elements will only reflect in the rendered navigation bar if a menu item of type Channel Tree has been registered, referencing an ancestor of the created channels. By default, when an instance of the navigation bar service is created, such a menu item is already created referencing the channel of the instance.

    Permissions

    • Manage service instance: Allows management of all data of this service instance, including deleting it entirely.
    ```