![]() '#description' => t('Enter additional classes to be added to the menu item. $menu_link_options = $menu_link_content->link ? $menu_link_content->link->first()->options : Next, we define our custom submit handler, where first build up the attributes array based on the user input, then load the menu link entity, set the value and finally save the changes. Navigate to Admin -> Configuration -> People -> IP Address Whitelist.This adds the input field for the class attribute and defines our custom submit handler.Edit: To add an item to the top row, use the hook mymoduletoolbar (). My module's name is mymodule, so you probably have to adjust this to your desired module name.īy default menu item attributes is like this: Example: mymodule.customroutename: title: 'MyModule Title' routename: mymodule.customsettingsform description: 'Custom Link' parent: system.admin weight: 102. I have created, but it dont get any value for localizedoptions when I debugged items. I'll now show you the necessary code snippets. I am trying to display menu description below Menu title in drupal 8. Stack Exchange network consists of 182 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |