help widget menu

Hello. Does anyone know how to set the menu widget so that all new pages, and any sub-pages, are immediately visible without having to change the widget on every single page? Thank you.

Hi Domine86 sorry for the late reply :slight_smile:

The only way to avoid replicating the configuration for every single page is to create a new widget.
Once the widget is created it can be reused as desired on each page without having to set it up from scratch.
In addition, widget can be set as default within a frame (page template section) so that when user creates a new page and he clicks on “apply default widget” button, widgets will be automatically set on the page.

The first step is to configure the navigation widget on a preferred page (ex. hompage).
In order to configure the navigation widget please add at least one expressions based on your page tree configuration.

See example below as reference

After the configuration is done click on save button and return to page configuration.
Then click on the 3 dots to the right of the menu navigation widget and select “save as new widget” as shown in the picture below.

Enter the Code of the new widget (ex. my_new_menu), enter a Title for each of the system languages (en,it)

​​and then click on “save and replace button” at the right bottom part .
You’ll be redirected to the page configuration where the newly created widget has replaced the old one.

Click on components menu -> templates. Now edit one of the page templates used in your portal. In the json configuration section add a default widget in the frame where the navigation menu is used. Check the picture below

Once the default widget is set, press the save button at the bottom right. Remember to repeat the operation for each page template you use in your portal.

Now every time you create a new page if you click on the “apply default widget” button your navigation widget (with all the other default widgets that may be present) will automatically appear on the page on the right spot.

1 Like

Hi d.minnai (we know each other, 2 months ago I took the rapid course for the E.I. with you). From the course I understood how to create the menu, but once I started creating the site I realized that if I have to add new pages to the site I will also have to insert them in the menu widget of each page. If I save the widget as default, it is no longer editable from the configuration page, but I guess I should edit it from the “micro frontend / widget” section, but I don’t know how. Is there a way to make the menu more “responsive” without editing the widget? P.s. sorry for english but i use google translate

Hello again :slight_smile: ,
the only way to modify navigation menu once it is transformed into a widget is to edit its parameters in the “micro frontend / widget” section. If you edit it and look at the bottom of the page you’ll find the list of its parameters (the pages set) as shown below in the photo:

Please notice that there are 2 sets of instructions that correspond to the only 2 types you should be use in your EI projects:

  • code (home) which corresponds to creating a link to a single page whose code corresponds to home
  • code (regiment) + subtree (1) creates a link to a parent page (whose code is regiment) that once it is clicked on it will show its 1st level siblings (+ subtree (1))

So if you need to add new pages to your Navigation menu feel free to add them to the parameter list in the navspec whenever you want.
After a new page is created it can be added by

+ code (new page code) adds a single page to the menu
+ code (new page code) + subtree (1) if you plan to add a parent page and its siblings.

Keep in mind that every time a new sibling page is created it will be automatically added to the Navigation menu widgets

1 Like

Thank you very much, you saved me a lot of work time.

1 Like