I want to separate the user account menu tabs structure into an individual page layout.

For short I want to remove the tabs, I know that the pages are different.

Snapshot attached.

enter image description here

What I have done so far is trying to use the theme suggestions but couldn't get any closer.

I get to know that it's being rendered from:


3 Answers 3


You could create different twig templates for that three pages and remove the local tasks from the display. Depending on your theme, it may also be sufficient to just disable the "tabs" block on these three pages. Then you'd create a custom menu (and block) with these three links in it and display it where you need it.


You have to extend page.html.twig in your theme/templates folder with the name suggestion that you get on enabling twig debug and remove the header section from it.

Remove this code:

 {# Header #}
      {% if page.header %}
        {% block header %}
          <div class="col-sm-12" role="heading">
            {{ page.header }}
        {% endblock %}
      {% endif %}

By this the tabs will be removed.


You can try this:

  function module_name_menu_local_tasks_alter(&$data, $route_name) {
  $routes = ['user.pass','user.login','user.register']; 
  if (in_array($route_name, $routes)) {

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.