How to set a custom class to submenus in Drupal 8?

I am working on sidebar menu in a Custom Drupal 8 Theme. I am trying to set a class of sidebar__menu--submenu-1,sidebar__menu--submenu-2, sidebar__menu--submenu-3 and so on depending on the level of the submenus.

So far, I was able to add the class sidebar__menu to the first level & sidebar__menu--submenu to all the submenus. However, I want to add the class sidebar__menu--submenu-(number of the level) so I can style & control the sidebar better on css.

Any help will be really appreciate it!

Here it is my code menu.html.twig:

How to theme a form? Render {{form}} elements separately in .html.twig template?

Hello Friends,

I have a simple form named BusinessListingSearchForm.php that looks as follows:

Fatal error on commerce log - order activity after core update to v8.6.10

Hello everyone,

After updating drupal core to v8.6.10 (highly critical security release: https://www.drupal.org/sa-core-2019-003) an issue with commerce log - order activity occurred.

Create multipages with the same custom module

Hello. First of all, sorry for my english, i am not really pro with languages. 

I am building a custom module. At this point i did a page, a form and can send it to database. Now i need build another page for update the data inserted in last form. I dont want to build another module, and i suposse there are other ways to do it on same module. 

Some help/guide would be great. Thank you.

I have this code on routing.yml:
 

Display node author on content type

Hello friends,

I am trying to add basic blog functionality to my drupal site using the UI.

What I have done so far:

  • Create a custom Blog content type 
  • Create a Blog Posts List view that displays my Blog content types is in a teaser view

What I would like to do now is show display the author and date of creation for each Blog in both the teaser and full view.

How do I go about achieving this?

FIXED - 1px height block-header (related to bootstrap theme)

Hi,

I'm currently tuning a custom theme based on bootstrap.

My issue is that header zone is always at least 1px height, even if empty. You'll see it here https://pit68.be/drpl/recherche just between banner at content.

Pages

Subscribe with RSS Subscribe to RSS - Drupal 8.x