You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have come across the issue that I'd like to be able to call some utility functions from a Mustache template. The situation is as follows: I have one template that needs to be rendered once for each slave, and each slave needs a unique ID. Because there can be many slaves, I don't want to provide sufficiently many templates, but rather have one template and render it multiple times with different input. I have worked around the issue for now myself by extending Model.Yaml and adding a custom property:
This works for now, but feels a little 'hacky' and I'd like to have it more natively integrated into Peel. Now I'm not too familiar with Scala yet, so maybe there's something clever that could be done with mixins to the existing models. I couldn't figure it out in a finite amount of time however, which is why I resorted to creating my own model.
If you have any hints how to do this more properly, I greatly appreciate any tips!
Thanks.
The text was updated successfully, but these errors were encountered:
I have come across the issue that I'd like to be able to call some utility functions from a Mustache template. The situation is as follows: I have one template that needs to be rendered once for each slave, and each slave needs a unique ID. Because there can be many slaves, I don't want to provide sufficiently many templates, but rather have one template and render it multiple times with different input. I have worked around the issue for now myself by extending
Model.Yaml
and adding a custom property:and my Mustache template then looks as follows:
This works for now, but feels a little 'hacky' and I'd like to have it more natively integrated into Peel. Now I'm not too familiar with Scala yet, so maybe there's something clever that could be done with mixins to the existing models. I couldn't figure it out in a finite amount of time however, which is why I resorted to creating my own model.
If you have any hints how to do this more properly, I greatly appreciate any tips!
Thanks.
The text was updated successfully, but these errors were encountered: