Bootstrap navbar active class drupal

2019-09-09 03:07发布

I`m rebuilding my old website into drupal 7.

I decided to use the drupal bootstrap theme, because my older website also uses bootstrap.

Bootstrap theme

By default the drupal navbar is included in this theme, but one thing is missing. It doesn't support the active css class. Altough the mouse over works fine, i'do need a way to make links active, depending on what page is visited. So for example if the main page is visited, the class should change into active, like the images shows right here.

Example of how it should look like

I know there are some ways to do this with jquery, but the solution i found don't seem to work on a when i fully change to page. On my old website i added and removed the active class using the url, but since my goal is to make it easy to add and remove pages i don't can come up with an idea to do this.

1条回答
Juvenile、少年°
2楼-- · 2019-09-09 03:24

I've found out that the drupal menu_block module adds the active class, so that's been solved. Tough now i`m stuck at a new problem, which has to do with the default block style, i asked it here.

查看更多
登录 后发表回答