This forum is for assistance with theme development.

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

Content Editing

Which file would contain the code to process output for the content block?  My goal is to change the tag words so that it spaces between the words instead of a break.

Thank you,

kevin

Drupal 9 Theme Comparison

Hi,

I'm just coming back to using Drupal 9 after many years time off for taking care of my Mom.

I started blogging about teaching, my full time job, and revamping some Drupal 7 sites by downloading Drupal 9 and installing 32 Drupal themes to see what they looked like. I dunno if it will help someone, but I found this kind of quick comparison lacking on the Internet.

I'm a teacher, not a developer, and not the greatest with Drupal, so I'm just coming at it from the point of view of a relatively technical end user. So I hope this is helpful and not annoying.

Avoid scrolling in the body

Hi,

I have to scroll up and down to see the contents in my page. Here is the link to the screenshot where you can see the scroll bar

https://imgur.com/a/ur0yA63

Can you please tell me how can I adjust the height of the body element so that I dont have to scroll to see the contents.

Thanks,

Pages

Subscribe with RSS Subscribe to RSS - Theme development