We've retired the forum in favor of GitHub Discussions.

New conversations can be started on GitHub. Existing conversations will remain for a while longer.

Head over to GitHub →

Reference Sections from Partials

Ian Streckel October 6, 2020 by Ian Streckel

I'm trying to figure out if it is possible to put markup into different sections from within a partial. I have a few components I have built into sets in Bard and want to be able to inject any styles or scripts associated with that component automatically.


{{ section:styles }}
<link rel="stylesheet" href="/css/component.css">
{{ /section:styles }}

<div class="component"></div>

{{ section:scripts }}

{{ /section:scripts }}

This does seem to work but only for the last set in a block...

>>>>>>> Unanswered <<<<<<<
2 Replies