1

I like to install in a bootstrap subtheme dropdown menu. But it does not work in my subtheme. Using the bootstrap theme it works.

my jolly.info.yml looks like this core: 8.x type: theme base theme: bootstrap

name: 'Jolly'
description: 'Theme for ...'
package: 'Bootstrap'

regions:
  navigation_collapsible: 'Navigation (Collapsible)'
  header: 'Top Bar'
  highlighted: 'Highlighted'
  search: 'Suchleiste'
  help: 'Help'
  content: 'Content'
  sidebar_first: 'Primary'

libraries:
  - 'jolly/global-styling'
  - 'jolly/bootstrap-scripts'

my jolly.libraries.yml looks like this

global-styling:
  css:
   theme:
     css/style.css: {}

bootstrap-scripts:
  js:
    bootstrap/js/affix.js: {}
    bootstrap/js/alert.js: {}
    bootstrap/js/button.js: {}
    bootstrap/js/carousel.js: {}
    bootstrap/js/collapse.js: {}
    bootstrap/js/dropdown.js: {}
    bootstrap/js/modal.js: {}
    bootstrap/js/tooltip.js: {}
    bootstrap/js/popover.js: {}
    bootstrap/js/scrollspy.js: {}
    bootstrap/js/tab.js: {}
    bootstrap/js/transition.js: {}

   dropdown:
    css:
      css/styles.css: {}
    js:
      js/dropdown.js: {}

and I use the same

menu--main.html.twig

like the bootstrap theme.

I try so many things but do not find what's wrong or what kind of dependency is necessary.

Can anybody help?

1 Answer 1

1

Add dependency in libraries.yml file just below the bootstrap js file:

dependencies:
- core/jquery
- core/drupal.ajax
- core/drupal
- core/drupalSettings
- core/jquery.once

1
  • no, same status like before.
    – lesley n.
    Aug 19, 2016 at 13:47

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