Open soniktrooth opened 7 years ago
theres a tiny bit of this happening of late already, yes no? is this a documentation thing? more about how we structure our json and templates? or is there something rob needs to do here?
I'm not sure what you mean by 'a tiny bit of this is happening'. We have some of Drupal's Twig filters in KS which is great but this is different. It seems the attributes
object is special and has a bunch of methods for dealing with attributes but the main upside is being able to print {{ attributes }}
without have to do nested loops inside the template to print out a multidimensional array.
YASSSSS
lol, from the drupal-attribute
project README:
Why would I need this?
If you're wondering, you probably don't need this.
@HakS done did it!!! https://www.npmjs.com/package/metalsmith-drupal-attribute-twig
Drupal does lots of nice things when it comes to handling attributes. It would be great to bring this to Kalastatic so that 1. we can use it and it's super handy and 2. we can have feature parity.
https://www.drupal.org/docs/8/theming-drupal-8/using-attributes-in-templates