This forum is for assistance with theme development.

D8 Home Page - How To Add Code?

On my Drupal 8 site, on my home page, I need to embed a small bit of code. (The embed is a very small <script> block required by a Google service.)

On older versions of Drupal I could do this easily by just editing template page-front.tpl.php and adding the embed code. What is the equivalent on D8?

Why is my custom theme's CSS not being used?

Hello to everyone who's reading this. :)

Could someone please tell me why my custom theme's CSS is not being used? I'm using Debian 9/Stable/Stretch and Drupal 7.

Here are some relevant documents.:

MyTheme.info:
http://dpaste.com/2T8JQS5

html.tpl.php:
http://dpaste.com/2DN3YPV

page.tpl.php:
http://dpaste.com/0Q1HJEG

Bootstrap's JavaScript requires jQuery. jQuery must be included before Bootstrap's JavaScript

Dear fellow developers,

I am working bootstrap theme customization. I am getting below error in browser console and in site i am not able to see menu and other options and getting faded with white color.

1.Bootstrap's JavaScript requires jQuery. jQuery must be included before Bootstrap's JavaScript
2.Bootstrap requires pooper.js for dropdowns.

Till now what I did is
1. I downloaded bootstrap library module from(https://www.drupal.org/project/bootstrap_library)and enabled it.

Drupal 8 - Dynamic Feature Image based on Exposed Filter

Hi everyone,

I am struggling with implementing a specific feature in my new website project and I'm hoping someone out there in the community can offer some guidance.

I have a Views page with a set of exposed filters for various categories/taxonomy terms that return teasers that link to the full node.

Each node has an image field with multiple values. By default in the view, I simply wish to show the first image from the mutifiield, which is fine for me to do in either the Views settings or calling {{ content.field_images.0}} in Twig.

Accessing a protected property in Twig

I am trying to add a class name to a template field. The new class name will be constructed from the content name + other text.

Trying to get the content name from element['#object']['values']['info']['x-default']. Always comes up NULL. Using {{kint()}} to display the values on the screen.

I do not know how to access protected fields with twig, and my searches on drupal.org and google.com are not finding anything.

Installing Foundation 6 using Composer

Hi,

I just added Composer to a fresh Drupal 8 install.

Now I am trying to install Foundation 6 for Drupal 8.

After searching for a while, I came across the following readme.txt (http://cgit.drupalcode.org/zurb-foundation/tree/README.txt?id=e861a29a80...) which states in pertinent part that Foundation, because it is built on Compass, uses a Ruby Gemfile.

Pages

Subscribe with RSS Subscribe to RSS - Theme development