Still on Drupal 7? Security support for Drupal 7 ended on 5 January 2025. Please visit our Drupal 7 End of Life resources page to review all of your options.
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.
In FillPDF, class FillPdfFormField extends ContentEntityBase. The method ::baseFieldDefinitions() uses BaseFieldDefinition::create() to create a bunch of fields. I need to write an update hook to change one of these from type string to string_long.