- Issue created by @introfini
- ivnish Kazakhstan
Thanks!
1) Needs to fix pipeline issues https://git.drupalcode.org/issue/flag-3486524/-/pipelines/334145
2) Needs test for new twig function
Currently, there's no easy way to generate flag/unflag links in Twig templates. Developers need to inject the flag.link_builder service into their controllers or use service container directly to build these links. This creates unnecessary boilerplate code and makes templates less maintainable.
Add a new Twig extension that provides a `flaglink()` function to generate flag/unflag links directly in templates, similar to the existing `flagcount()` function.
Example usage:
{{ flaglink('node', node.id, 'bookmark') }}
Active
4.0
Flag core
Thanks!
1) Needs to fix pipeline issues https://git.drupalcode.org/issue/flag-3486524/-/pipelines/334145
2) Needs test for new twig function