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

allow array type for shortcodes #270

piedoom opened this Issue Mar 27, 2018 · 2 comments


None yet
3 participants

piedoom commented Mar 27, 2018

I'm creating an album shortcode that contains an arbitrary amount of images. It'd be very nice to be able to just go something like:

{{ album(paths=["file1.jpg", "file2.jpg", "file3.jpg"]) }}

Because arrays are ignored, the next best solution that I can imagine is something like defining manually different amounts for different shortcodes, i.e. album2, album3, album4, and so on.


This comment has been minimized.


Keats commented Mar 27, 2018

Yep definitely something I want, just need to fix the markdown renderer first!

@Keats Keats added the enhancement label Mar 27, 2018


This comment has been minimized.

asaaki commented Mar 27, 2018

Another workaround should be to provide a splittable string and an optionally overridable separator.

{{ album(paths="file1.jpg,file2.jpg,file3.jpg", sep=",") }}

But I'd also agree that we need self-definable arrays (not only in shortcodes, but supported by tera in general).

@Keats Keats referenced this issue May 7, 2018


Markdown next #302

@Keats Keats added the done label May 11, 2018

@Keats Keats closed this Aug 3, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment