8 – Render an HTML element before the menu with the link preprocess menu

I want to render an HTML element like This is my menu before my menu I thought that the easiest solution is to alter the menu. I already altered my menu to add a class. But how do I add an item before my menu with a link preprocessing function?

I know I can extend menu.html.twig to menu--my-mwnu.html.twig and add it there, but I think it's less overhead to add it with a preprocessing function.

/**
 * Implements hook_preprocess_menu().
 */
function mytheme_theme_preprocess_menu(&$variables) {

  if (isset($variables('menu_name'))) {
    if ($variables('menu_name') === 'my-menu') {

      $variables('attributes')('class')() = 'my-menu';
    }
  }
}

grub2: how to make the grub menu appear instead of booting directly in Windows 10

  • HP Envy X360 with SecureBoot / UEFI boot loader
  • I ran the boot repair from a USB stick
  • I tried to change the boot order in BIOS (I see Windows and ubuntu but I can't select and save ubuntu)
  • With F9 at boot I can see the ubuntu menu, I can also successfully boot to W10 or ubuntu 18.04
  • I can also see and restart the grub menu from Windows with super-r, ms-settings: recovery, Restart Now and choose boot from External, choose ubuntu

So I guess this is a question from HP, as well as one from ubuntu. I will review your discussion groups and, if I get an answer, I will report here. I can also try to erase all secure BIOS boot keys to see if that allows me to select grub as first in the boot order.

TIA for any advice or ideas that HP owners may have.
–Alex

magento2: result of the action of the Magento 2 administration menu Invalid security or form key. Please refresh the page. by clicking

Forgive me for my question. Still new with magento 2.

So I successfully added a new administration menu. But the problem is that every time I click on the administration menu button, I get invalid security or form key. Please refresh the page.

Here are some of my codes.

This is my menu.xml

     

And this is what my directory looks like.

enter the description of the image here

enter the description of the image here

bootstrap: How to create a responsive drop-down menu so that a touch on the text goes to a page and a touch on the down arrow expands to show the submenu?

Battery exchange network

The Stack Exchange network consists of 175 question and answer communities, including Stack Overflow, the largest and most reliable online community for developers to learn, share their knowledge and develop their careers.

Visit Stack Exchange

grub2 – Ubuntu 19.10 disables the grub menu

Cannot set a grub timeout 0 but you can set a timeout of 0.1 that you hardly notice difference from 0. First use sudo -H gedit /etc/default/grub. Then locate these lines:

#GRUB_HIDDEN_TIMEOUT_QUIET=false
#GRUB_TIMEOUT_STYLE=countdown
#GRUB_HIDDEN_TIMEOUT=0
GRUB_TIMEOUT=0.1

Placing a # In front he makes a comment. Leave the rest of the line the same in case you need it again.

The last line is the wait time. Leave it as a regular command (no #) but change the value to 0.1.

Finally run sudo update-grub to compile the configuration file in a new grub boot script.

json: multi-level dependent drop-down menu with restAPI on Flutter

I have a problem regarding several dependent levels dropDownButton in flutter. I successfully obtained the API data and got the answer in this way

{count: 11, next: null, previous: null, results: ({id: 11111, idExternal: Update ext, clientName: Test1 , clientNo: 123, street: asdasd, zip: 1212, city: aaa, country: US, vat: 12312412, company: companyid123, accountNoLength: 4, bookingTypes: ({id: 123124, bookingCategory: AR, bookingName: AR, verboseName: , client: aljsdnajlsnd, accountNumber: null}, {id: 12312424, bookingCategory: ER, bookingName: ER, verboseName: , client: 123123124, accountNumber: null}, {id: 1341243, bookingCategory: KA, bookingName: KA, verboseName: , client: f124312412, accountNumber: }).......}}

The data I need to show in the first dropDownButton It's CLientName and ClientNo. For the second one I need bookingCategory and this should correspond with the first one, because a Client can have between 1 and 6 different categories. I managed to do so.

@override
  void initState() {
    super.initState();

    widget.model.fetchClientData().then((data) => setState(() {
          _results = data('results');

          for (int i = 0; i < _results.length; i++) {
            List _clientBookingCategories = ();
            _clientNameNo
                .add('${_results(i)('clientName')} ${_results(i)('clientNo')}');//first dropwdown

            _help.add(_results(i)('bookingTypes'));
            for (int j = 0; j < _help(i).length; j++) {
              _clientBookingCategories.add(
                (_help(i)(j)('bookingCategory')),
              );
            }

            _bookingCategories.add(_clientBookingCategories); // second dropdown
          }

          _clientsAndBookings =
              Map.fromIterables(_clientNameNo, _bookingCategories); //two lists merged 


        }));
  }

This is how I showed the first drop-down button.

 Widget build(BuildContext context) {
    final deviceWidth = MediaQuery.of(context).size.width;
    final deviceHeigth = MediaQuery.of(context).size.height;
    return Scaffold(
      body: SafeArea(
        child: Container(
          height: deviceHeigth,
          width: deviceWidth,
          color: Colors.blueAccent,
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            crossAxisAlignment: CrossAxisAlignment.center,
            children: (
              Text('Select the client type and booking category',
                  textAlign: TextAlign.center),
              SizedBox(
                height: 10.0,
              ),
              DropdownButton(
                //isExpanded: true,
                hint: Text('Select a client'),
                items: _clientNameNo.map((client) {
                  return DropdownMenuItem(
                    child: Text(client),
                    value: client,
                  );
                }).toList(),
                onChanged: (value) {
                  setState(() {
                    _valueClient = value;
                  });
                },
                value: _valueClient,
              ),
              // DropdownButton(
              //   isExpanded: true,
              //    hint: Text('Select a category'),
              //   value: _valueCategory,
              //   onChanged: (value) {
              //     setState(() {
              //       _valueCategory = value;
              //     });
              //   },
              //   items: _bookingCategories.map((category) {
              //     return DropdownMenuItem(
              //       child: Text(category),
              //       value: category,
              //     );
              //   }).toList(),
              // ),

              SizedBox(
                height: 50.0,
              ),
              SizedBox(
                height: 50.0,
              ),
              ScopedModelDescendant(
                builder: (BuildContext context, Widget child, MainModel model) {
                  return RaisedButton(
                    onPressed: null,
                    child: Text(
                      'Upload',
                      style: TextStyle(color: Colors.white),
                    ),
                    color: Colors.white,
                  );
                },
              )
            ),
          ),
        ),
      ),
    );
  }

I merged both lists and they look like this.

{Test1 123: (AR, ER, KA), Test2 345: (AR, ER, KA), Test3 444: ( KA, VK),..... }

And now I have the problem of how to iterate through this merged list because if it is written like this, I have no key: torque values.

I found this article https://medium.com/@afegbua/flutter-thursday-08-multi-level-dependent-dropdown-d965c08d2748 (gitHub) that does exactly what I want, except it already has its list stored locally and I need retrieve my API data. In the Repository of your class, you have the _nigeria list and can browse it using

List getAll() => _nigeria;

getLocalByState(String state) => _nigeria
      .map((map) => StateModel.fromJson(map))
      .where((item) => item.state == state)
      .map((item) => item.lgas)
      .expand((i) => i)
      .toList();
  // _nigeria.where((list) => list('state') == state);
  // .map((item) => item('lgas'))
  // .expand((i) => i)
  // .toList();

  List getStates() => _nigeria
      .map((map) => StateModel.fromJson(map))
      .map((item) => item.state)
      .toList();
  // _nigeria.map((item) => item('state').toString()).toList();

Any help or suggestions would be greatly appreciated.

navigation – drupal 8 modifying the route of the menu items

I work in a drupal 8 application that uses the group module with the restriction of only one group per user. I want to be able to modify the menu items so that the user group identification is always in the url. this way I can use views with a group ID in the url.

I search and always go to the same pages with the same example that does not work for me.

Aria's problems with the navigation menu bar

I have a menu bar but
It seems that I was wrong about functionality, according to this page https://www.w3.org/TR/wai-aria-practices/examples/menubar/menubar-1/menubar-1.html

The menu bar should open with the down arrows, and navigate through the up and down keys, to go to the next tab you must press left or right, not TAB, the tab must leave the menu and go to the content … How can I do this with the code given that I have above? thanks






    
    
    
Menu navigation test



    

This is a generic hierarchical navigation menu.

This is a sticky hierarchical navigation menu. It contains a drop-down functionality when clicked on it.
When you scroll through it, the drop-down menu in focus opens.
When minimized, it becomes an animated hamburger menu.

Code (marked):

SEMrush

drop-down list – Reset an autocomplete drop-down menu?

In one of our filter panels, we have a drop-down menu that is optional and acts as an autocomplete drop-down menu. Essentially, values ​​appear when a user clicks / searches the field. We need to allow the user to reset the drop-down menu, since it is optional if you have added the value and want to delete it.

If this were not an autocomplete drop-down menu, then it would be possible to have the default drop-down name as the restart option. However, because it is, this may seem strange. Do you have any suggestions on how this should be addressed? These are the things I thought:
1. Have none as an option.
2. Allow them to reset it by removing any value they put backing the space (since the drop-down menu is automatically completed, this is allowed) by clicking outside it, I am not sure if this is technically possible, but it is an idea.

An additional context: when this drop-down menu has a value, another drop-down menu appears that is connected to it. When the value is deleted, that drop-down menu disappears.

Thank you all!

javascript – create an interactive menu with drop-down options around an image

I want to make an interactive menu, to the center the cloud image and when I hover over the image that shows me 6 menus around, annex shows the idea of ​​how it would look, someone who can support me with the css and js, or some library allow to do it.

sample menu sample