Follow

Installing Standard Topic Buttons on a Drupal Site

This documentation was created and tested on Drupal 8

Drupal’s customization through themes and modules provides developers with a number of ways to install sayso's standard Topic buttons on your website. As we cannot account for all of these variations, we are providing a very basic integration instruction.

For more information about utilizing Javascript in Drupal theming please refer to Drupal’s documenation https://www.drupal.org/docs/8/theming/adding-stylesheets-css-and-javascript-js-to-a-drupal-8-theme

Requirements:

  • Your webpage must have HTTPS set up
  • You must have CLI access
  • Your theme must have ‘html.html.twig’ located in /drupal/themes/[template name]/templates/system/

Please refer to either your theme’s documentation or Drupal’s documentation if you do not have this file.  Drupal provides it as part of your core library but an understanding of theming may be required to ensure it is used properly.

For the purposes of this demonstration, we have set up Drupal theme Bootstrap which includes the html.html.twig instance.

 

Log onto your server using your terminal program. Navigate to [drupal root]/themes/[theme-name]/templates/system. Use your editor to modify html.html.twig

 

image2.png

 

For Bootstrap’s default settings our code was inserted on line 8, just above the </head> marker.

From here you will need to clear your cache.  On Drupal’s front end, go to Configuration, and under the Development header you’ll see Performance.

 

image5.png

 

From here click Clear all Caches

 

image3.pngimage1.png

Then load your site and you should now see the Topic buttons on your site.

 

image4.png

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments