How can I pass an argument of a shortcode to a partial?

My short code looks like this:

{{ $folder := .Get "galleryfolder" }}
{{ partial "pgallery" $folder }}

I cannot manage to take the galleryfolder argument and pass it down to the partial “pgallery”. Any ideas?

1 Like

I don’t think this is possible; shortcodes are placed inside the content while partials are used by the theme.

Have you thought about using the partial code in the shortcode, or wouldn’t that fit your use case?

good point. i had troubles with that, but now as you say that, i wonder which. will try again.

yepp, that work just fine. thx for bringing me back!