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
Cannot figure out how to change template engine #3961
Comments
Hi. I am experiencing the same problem. I am using Sails version 0.12.11 and ect 0.5.9. Problem is same and I still haven't figured out the solution.
|
Hi. I found out where is the problem. Problem is in consolidate.js. On the line 948 there is
so that means in consolidate.js on the line 948 it should be Best regards. |
Thanks for reaching out. It looks like the ECT engine usage is a bit different than most of the other template engines supported by Consolidate, so you have to use the extended view config syntax to make it work. In
The A couple of things to keep in mind:
|
Sails version: 0.12.11
Node version: 6.8.1
NPM version: 3.10.8
Operating system: Windows 10
Forgive me, but do understand I do this entirely as a last resort. I tried EJS, and the basic truth of it is that I do not like it. In looking I found that ECT seems to be more applicable to me, but I cannot figure out how to properly change the view engine. All I tend to get are errors.
Things I've done
npm install --save ect
npm uninstall --save ejs
*.ejs
files to*.ect
files.config/views.js
config engine fromejs
toect
layout:false
Looking at that file/line the code I see is this: (rest of function given for context):
I have not found a guide or anything resembling one on how to change the view template (short of using
sails new app --template=jade
and a fix on an issue that does not seem to be relevant anymore, or at least I can't find the file it points to in order to attempt the same thing).Any help on how to change the template engine in general would be appreciated, and I am sorry to bother the Sails team but I hope everyone understand this is my last ditch effort to figure out how to change the sails template engine to something I would prefer to use.
The text was updated successfully, but these errors were encountered: