-
Notifications
You must be signed in to change notification settings - Fork 225
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
Include with subcontext not working #223
Comments
Is that |
It should be a dictionary. It's generated by Kitura from the following Codable struct:
which is used as a property in my parent context:
|
Mmmh strange indeed. Haven't re-tested that recently, but I remember it working (outside of Kitura though, but shouldn't really change much) a while ago… @ilyapuchka any idea? |
The behaviour won't support embedding codable object like you have. The include sub-context must be a dictionary itself. |
Hmm. I've checked what Kitura does, and it's basically just generating a JSON dictionary from my Codable:
(somewhat simplified) In this case, my Shouldn't this work? |
@kylef Do you know if anyone actually uses this feature? I'd love to see some examples of it, so I can figure out what works and what doesn't. |
@svanimpe There is a test-case at
|
I've tried changing that test to use Codable, as follows:
But that still passes, so the issue must be elsewhere 🤔 |
From https://stencil.fuller.li/en/latest/builtins.html#built-in-tags:
That's not working for me. I'm getting a "unable to render context" error.
This is my code:
{% include "snippets/date-time-picker.stencil" date %}
date
is included in my context (I'm using it in other places as well). Since that snippet only usesdate
, I was hoping to remove thedate.
prefix from all my variables.The text was updated successfully, but these errors were encountered: