You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 31, 2023. It is now read-only.
What are the steps to getting Drupal.behaviors to work in Pattern Lab? Has it changed since the addition of the new pl_attach-library function?
I had them working in an older emulsify-based project but can't get it to work on a newer project (created from the develop branch of emulsify a few days ago).
I am able to verify that the library is getting attached to the component, it's just not working when I wrap it in a behavior.
Here's a copy of my _01.foot.twig file
I created each of those symlinks and uncommented the appropriate scripts.
<!--DO NOT REMOVE-->
{{ patternLabFoot | raw }}
<!-- Drupal-specific usage -->
<!-- example using symlinking -->
<!-- cd web/themes/custom/emulsify/components/js -->
<!-- ln -s ../../../../../core/assets/vendor/domready/ready.min.js ./ -->
<!-- ln -s ../../../../../core/misc/drupal.js ./ -->
<!-- ln -s ../../../../../core/assets/vendor/jquery/jquery.min.js ./ -->
<!-- UNCOMMENT AS NECESSARY -->
<script src="../../js/ready.min.js"></script>
<script src="../../js/drupal.js"></script>
<script src="../../js/jquery.min.js"></script>
<!-- If using Drupal.behaviors, uncomment for them to work in Pattern Lab -->
<script> Drupal.attachBehaviors(); </script>
</body>
</html>
The text was updated successfully, but these errors were encountered:
from components/_meta/_01-foot.twig to inside the <head> tag in components/_meta/_00-head.twig.
2. Edit components/_twig-components/functions/pl_attach-library.function.php and remove the async attribute on line 25.
What are the steps to getting Drupal.behaviors to work in Pattern Lab? Has it changed since the addition of the new pl_attach-library function?
I had them working in an older emulsify-based project but can't get it to work on a newer project (created from the develop branch of emulsify a few days ago).
I am able to verify that the library is getting attached to the component, it's just not working when I wrap it in a behavior.
Here's a copy of my _01.foot.twig file
I created each of those symlinks and uncommented the appropriate scripts.
The text was updated successfully, but these errors were encountered: