Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "Attributes" class to Twig.js and KalaStatic #473

Open
soniktrooth opened this issue May 13, 2017 · 8 comments
Open

Add "Attributes" class to Twig.js and KalaStatic #473

soniktrooth opened this issue May 13, 2017 · 8 comments
Milestone

Comments

@soniktrooth
Copy link
Contributor

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

@thiagodemellobueno
Copy link
Contributor

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?

@soniktrooth
Copy link
Contributor Author

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.

@RobLoach RobLoach changed the title Nice handling of attributes Add "Attributes" class to Twig.js and KalaStatic May 31, 2017
@RobLoach
Copy link
Contributor

@RobLoach RobLoach added this to the Wishlist milestone Jun 14, 2017
@RobLoach
Copy link
Contributor

@soniktrooth
Copy link
Contributor Author

YASSSSS

@hawkeyetwolf
Copy link

lol, from the drupal-attribute project README:

Why would I need this?

If you're wondering, you probably don't need this.

@soniktrooth
Copy link
Contributor Author

@RobLoach
Copy link
Contributor

@RobLoach RobLoach removed their assignment Feb 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants