Specify a partial to include via frontmatter?

We’ve created several different sliders and saved them as partials…

Then on our Pages we have specified in the frontmatter which partial we’d like to inject
UseSlider: one

So if we only are using a single Layout; what handlebar would we need to use to get the proper partial specified in the frontmatter to be injected into the page?

Thanks for any suggestions!

Found out how to do this…
In the Layout I used {{> (lookup . ‘UseSlider’ )}}

All pages using that layout must have a UseSlider value to avoid error.

1 Like

Awesome =)
Great that you find a solution that works.

Yes; happy to find a solution. Is there a way to have it fallback to a default partial if the partial wasn’t specified in the page frontmattter? Currently it causes an error if the pages is missing that frontmatter.
Thanks for any ideas!