I'm sure there's a very simple answer to this, but I need to determine the URL, URI, whatever, of the page that this template is currently executing on.
When I try to see what's in the Twig global variable "app" I get NULL. When I try to see what's in the variable "parent" I get NULL.
I'm getting a PHP error listed in my recent log messages and I can't figure out what's wrong. Please can someone help?
RuntimeException: Failed to start the session because headers have already been sent by "/Volumes/HDD/Tom/Documents/Projects/drupal/vendor/symfony/http-foundation/Response.php" at line 359. in Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage->start() (line 144 of /Volumes/HDD/Tom/Documents/Projects/drupal/vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php).
I have put main navigation to two different areas. In area A the blocks shows only level 1 menu items and on area B it shows from level 2 to N. Now I would like to use different twig template for these two blocks but it seems that they both just use the same template. Is there any way to make two separate templates or even identify these two blocks so that I could make some if-else to the template file?
I did a custom block who can display data from database. It is displaying with the function build(), so i have to clear the cache everytime my data are changed in the database, to update the displayed data.
Is it possible toi create a php file who is executed everyday (cron) ? Or any other solution to clear the cache automatically ?