Reputation: 1973
Is it possible to use swig inheritance in geddy? When I'm looking at the code generated by geddy gen app app1 --swig, It looks like everything is like ejs but just changed it to {{ or {%.
Is there a documentation on how to use swig on Geddy or maybe an example.
Thanks
Upvotes: 0
Views: 99
Reputation: 7156
A few issues:
Upvotes: 2
Reputation: 1302
What we have been doing with the other template engines is using the geddy partial
helper function. This is more flexible than using the native subtemplate syntax that comes bundled with the template engines.
I was working on our Swig scaffolds a few months back and could not get partial
to work with swig. I couldn't get it to pass the current rendering context to the sub-template, so all my variables were undefined.
This might have changed as Swig had a major update recently. If you have any luck, please let us know on GitHub or the mailing list so we can make the changes to our scaffolding code.
Here is an example of how partial
is used in handlebars, note that this
is used to pass the current rending context to the subview.
Here is the same thing done in jade, and again in ejs.
Upvotes: 0