I am implementing successfully a gallery partial using the resources feature as follows:
<div id="portfolio">
{{ with .Resources.ByType "image" }}
{{ range . }}
{{ $scaled := .Resize "x300" }}
<div class="tile">
<a href="{{ .Permalink }}" data-href="{{ $scaled.Permalink }}" class="progressive replace">
<img src="{{ .Permalink }}" class="preview" alt="{{ with $.Page.Params.title }}{{ . }}{{ end }}"></a></div>
{{ end }}{{ end }}
</div>
It works as a partial, but now I would like to use the same feature in a shortcode such as
{{% gallery folder="" title="" %}}
The folder should be a subfolder of the page bundle.
I tried to follow the same route as the one described in this post but no success.
Need some help.