1

I have a question, which I want to solve for a really long time now. I'm creating my own boostrap sub-theme.

I 3 links in my drupal menu: enter image description here

I want this menu to be available on every page, and it should be possible to access every link on every page. My code in page.tpl.php:

<div class="<?php print $navbar_classes ?>">
    <div class="container">
        <?php if (!empty($primary_nav) || !empty($secondary_nav) || !empty($page['navigation'])): ?>
            <div class="navbar-collapse collapse">
                <nav role="navigation">
                    <?php print render($primary_nav) ?>
                    <?php print render($secondary_nav) ?>
                    <?php print render($page['navigation']) ?>
                </nav>
            </div>
        <?php endif ?>
    </div>
</div>

However I can only go to the sub (e.g. /info/sub) when I'm on the parent (e.g. info). I have tried to use superfirsh but then I loose all advantages of boostrap.

Home page, there isn't a caret:

enter image description here

Info page, there is a caret:

enter image description here

Note that the HTML code for the dropdown menu isn't available on the home page.

I know this is possible, but how? Thanks!

3

Can you please try this:

  1. Go to structure and then open your menu link
  2. Enabled the "Show as expanded" option for your parent menu item.(in your case it is info menu item).

I hope it will work for you.

  • 1
    Thanks this worked. I found that option, but though it meant something different. – LEDfan Jul 8 '15 at 11:19
  • 1
    Was looking for this so long. – Rizwan Abbas Jul 8 '15 at 11:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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