- Issue created by @capellic
- πΊπΈUnited States fathershawn New York
You would need a route that will render the needed paragraph. If that is the latest revision of that paragraph, then our included route would work I think.
I also added in v1.3 the ability to instantiate an HtmxAttribute object in Twig.
So if you have the needed information in the template for which paragraph to load, you should be able to add htmx attributes to request, select and swap some target triggered by load.
- πΊπΈUnited States fathershawn New York
Please re-open and/or switch to a feature request if more is needed.
- πΊπΈUnited States capellic Austin, Texas
Thanks @fathershawn,
I plan on reporting back when I've given this a try. I have time blocked next week for a little R&D. :-)
- πΊπΈUnited States capellic Austin, Texas
Got it working with a static ID, this code ins the paragraph--type.html.twig file:
{% set htmx = create_htmx() %} {% set path = 'htmx/paragraph/451/default' %} <div {{ htmx.get(drupal_url(path)).trigger('revealed') }}></div>