Skip to main content
4 events
when toggle format what by license comment
Jun 11, 2017 at 15:16 comment added 4uk4 Yes, I agree 100 %, my recommendation is in the first paragraph, what you normally do. The second paragraph is when you need to access block fields bypassing the standard block rendering.
Jun 11, 2017 at 14:45 comment added Christoph Burschka (Apparently that last thing is being tracked here: drupal.org/node/1843798)
Jun 11, 2017 at 14:41 comment added Christoph Burschka I'm ambivalent - it does break some Drupal conventions and is brittle (eg. block must stay in the region), but it's not necessarily an anti-pattern. We can't take all logic out of the front-end, and I've found the more it is tried the more front-end devs will use horrible hacks to get around it. ;) I've used Twig Tweak, and unfortunately that completely bypasses the block layout - we still need to to show or hide blocks conditionally. The best solution here would probably if Drupal gets OO renderables instead of arrays, and lets templates access lazy-built variables on demand.
Jun 7, 2017 at 15:52 history answered 4uk4 CC BY-SA 3.0