How do I keep a twig variable from getting cached?

I have a content-type (house) with a date field "field_visiting_date" to indicate when a house can be visited.

Instead of just display the date, I also show how many days there are left until it's visiting day,
so in short, the difference in days between the visiting_day date and today. I currently have in my node display "teaser" twig file:

Programmatically create a child menu item for a view menu item

Hi everyone,

I need help with a menu item I want to create programmatically through (this is a piece of extra information) a presave hook. In particular, I want to make a menu item that is a child of a menu item created by a view (in the view administration page).

Also: I listed all children of a specific menu item (that is the parent of the menu item created by the view) and, of course, it wasn't listed with the other *basic* menu items.

How I can create a menu item that is a child of the view menu item?

This is my piece of code:

Editic module

The purpose of this module is to enable developers to quickly set up a system for generating electronic documents from a json feed and a docx model.

Views with Grid option not loading in Firefox browser only

Im having a problem with some of my views only when Im using Firefox both on mac and windows. 

When I load the page the view with a grid option doesn't load and instead shows a loading icon, however if I resize the window even slightly it loads fine.

I'm using nginx web server, drupal 8.

Please could you help as I need it to load straight away. Thank you in advance for any help.

https://imgur.com/Z8eK4nk

How to call basePath in Drupal 8 js ?

Hi Guys, 

I'm converting my Drupal 7 project to Drupal 8 and in Drupal 7 we are using Drupal.settings.basePath and basePath is set in drupal_add_js function which is deprecated in Drupal 8. 

So, How can I use this basePath in Drupal 8 js ?

Can I make ?

Hi Guys,

It is possible to call a twig file after clicking any button in Drupal 8?
if yes then how can I achieve this ?

Pages

Subscribe with RSS Subscribe to RSS - Drupal 8.x