-
Notifications
You must be signed in to change notification settings - Fork 973
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
Comments
Yep definitely something I want, just need to fix the markdown renderer first! |
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). |
Anyone know of an example Shortcode that takes an array as an argument? I have a super neat idea for a shortcode, and passing an array to it will make things much easier. |
It should work as expected in the original comment? |
YEP! it works, I made an image hover comparison shortcode: imghover |
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:
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.The text was updated successfully, but these errors were encountered: