0

After adding the "html.tpl.php" and "page.tpl.html" to my bootstrap subtheme the layout of my main menu disappeard as you can see in the screenshot below:

menu

As you can see; no bootstrap classes are applied to the menu:

<h2 class="block-title">Main menu</h2>
    <div class="contextual-links-wrapper"><ul class="contextual-links"><li class="menu-list first"><a href="/drupal/admin/structure/menu/manage/main-menu/list?destination=node">List links</a></li>
<li class="menu-edit"><a href="/drupal/admin/structure/menu/manage/main-menu/edit?destination=node">Edit menu</a></li>
<li class="block-configure last"><a href="/drupal/admin/structure/block/manage/system/main-menu/configure?destination=node">Configure block</a></li>
</ul></div>
  <ul class="menu nav"><li class="first leaf"><a href="/drupal/lessenrooster">Lessenrooster</a></li>
<li class="collapsed"><a href="/drupal/over-ons">Over ons</a></li>
<li class="leaf"><a href="/drupal/contact" title="">Contact</a></li>
<li class="last leaf"><a href="/drupal/fotogallerij">Fotogallerij</a></li>
</ul>
</section>

The bootstrap subtheme however is active:

enter image description here

EDIT 1

I indeed did use the wrong .tpl files. I now have copied the correct files to the subtheme (which included the correct .info file). However the .info file does not include the main_menu region.

regions[navigation]     = 'Navigation'
regions[header]         = 'Top Bar'
regions[highlighted]    = 'Highlighted'
regions[help]           = 'Help'
regions[content]        = 'Content'
regions[sidebar_first]  = 'Primary'
regions[sidebar_second] = 'Secondary'
regions[footer]         = 'Footer'
regions[page_top]       = 'Page top'
regions[page_bottom]    = 'Page bottom'

After clearing the cache, the main menu did not change.

EDIT 2

I started all over again following this guide, but still the main menu looks like crap... and if i copy over the menu folder from bootstrap I get an HTTP ERROR 500 error

2
  • 1
    Where did you get your templates? Did you take your templates from the main bootstrap theme templates folder or take system templates?
    – Andrew Nim
    Commented Dec 14, 2016 at 22:58
  • your menu will be displaying under "Navigation"(region).
    – danuddara
    Commented Dec 23, 2016 at 1:05

1 Answer 1

1

You must use the template files from bootstrap theme since all those are overridden there. the templates file you should use are under themes > bootstrap > templates > system.

copy the page.tpl.php and html.tpl.php from there to your sub-theme.

simply use the same .info file for your sub theme as well. it will give you all the regions. set "base theme=bootstrap" in template_name.info file.

remember to clear the cache

4
  • Thanks. I am now using the correct .tpl files and it did change the layout of the site for the better, but the main menu did not change.
    – David
    Commented Dec 22, 2016 at 9:05
  • If I enable the "base bootstrap" theme the main menu looks fine.
    – David
    Commented Dec 22, 2016 at 9:11
  • Ok David. for the subtheme.info file you should use name = subtheme_Bootstrap description = subtheme created from bootstrap theme. core = 7.x base theme=bootstrap stylesheets[all][] = 'css/style.css' /*your custom style sheet*/ version = "7.x-0.1" core = "7.x" project = "subtheme_bootstrap" and just have the page.tpl.php and html.tpl.php under your 'subtheme>templates' folder.
    – danuddara
    Commented Dec 22, 2016 at 21:48
  • In your subtheme folder, you should only have subtheme.info file with the given content above. A CSS folder with custom sytlesheet (if you have one), templates folder which is containing the bootstrap page.tpl.php and html.tpl.php files.
    – danuddara
    Commented Dec 22, 2016 at 21:58

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.