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

Use timber-acf-wp-blocks with TwigStackExtension #53

Open
merijnponzo opened this issue Sep 22, 2021 · 2 comments
Open

Use timber-acf-wp-blocks with TwigStackExtension #53

merijnponzo opened this issue Sep 22, 2021 · 2 comments

Comments

@merijnponzo
Copy link

Hello,

Instead of using EnqueueScript i would rather 'stack' my javascript from each .twig block and push it to the footer (inline)
Similar to blades '@stack' function i tested twig-stack-extension https://github.com/filhocodes/twig-stack-extension but it's not working with the timber-acf-wp-blocks.

My guess is that like the twig-stack-extension says:

This extension allows you to define a section of a "base template" that will receive contents from all the other pages, either via include, embed or extends.

The twig-stack-extension is not triggered within the timber-acf-wp-blocks.php

Timber::render( $paths, $context );

Any ideas how scripts within the blocks could be stacked and outputted inline within the footer like this example

Would be super awesome

@palmiak
Copy link
Owner

palmiak commented Sep 22, 2021

This looks really amazing, but because we rely on Timber I think we should think a bit more about integrating this feature into Timber (or creating an add-on for it).

Than Timber ACF Blocks should work with this out of the box.

@merijnponzo
Copy link
Author

True story, great plugin! Thanks

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

2 participants