This forum is for assistance with theme development.

_page.html.twig not updating website

Hello! I am new to Drupal, and I'm creating a custom theme based on a Bootstrap Bario subtheme on Drupal 8.
I can update the CSS with no problem, but I first need to clear the cache before reloading the page (which gets annoying, is there a way to avoid that?).

This is how the theme's regions are arranged: https://i.stack.imgur.com/LJBdF.png

Drupal 8 header.html template by Taxonomy

Hi...

The content on our website is structured by Taxonomy.

The marketing department wants a particular header region by taxonomy.

How could I combine the templates of region and taxonomy?

Thanks,

Pedro

How to display the TWIG code if the result is not 0 ?

I have a TWIG template in Drupal 8. The "dangers" value is incremented according to the result of each view. How to display the TWIG code if the result of "dangers" is not 0

I tested this code 

{% if dangers > 0 %}

but it doesn't work :

How to make the counter TWIG ignore the Drupal cache ?

This question is related to my previous question :

How to create a counter with TWIG?

I have a site with Drupal 8 and a menu which includes a task counter :

enter image description here

The counter works fine, but to update it, I have to empty the drupal cache every time.

How to do a calculation with JS and TWIG ?

I have a site with Drupal 8 and Bootstrap 3. I have a task list and I want to calculate the number of "warning" tasks and the number of "danger" tasks.

So I created a TWIG file in my theme.

It works, but my counter is cached and you have to empty the Drupal cache for it to update.

How can I display the total of "warning" tasks and the total of "danger" tasks in my counter (badge) with JS ? Because with TWIG and Drupal 8 it's complicated to manage the cache.

Twig: How to use reference content for multiple entries

Trying to build a related articles control that allows the user to pick related content (page type = article) up to 3.    I'm trying to prevent reentry of content to display title, teaser, and page image.   I assume I'm using a Reference Content field that allows multiple values.     Does anyone have a good example of how to put that in my twig template?   Not sure of the syntax.

Thanks

Pages

Subscribe with RSS Subscribe to RSS - Theme development