Hello, I ran into situation when ect was throwing an error because it couldn't locate parent template ex:<% extend 'layout.html' %>. I was simply trying to read layout.html an of course failing. That happens because there is no way right now to pass options to engines. So... I found two ways of fixing the issue - 1) fix it on ECT side and check if root path wasn't set figure out prefix path for the first template which was passed into render function, get beginning path and assign it to the root. 2) Add engine settings parameter to render in co-views, co-render engine call and ect within consolidate (with proper fallback for backwards compatibility).
First approach would require less changes, but doesn't fix the root of the issue. Second approach opens possibility to adjust other engines as well.
I already have fixes and can create requests. Please let me know what you think.
I'll also reference that issue at ect repository to see what creator thinks about it.
Hello, I ran into situation when ect was throwing an error because it couldn't locate parent template ex:
<% extend 'layout.html' %>
. I was simply trying to read layout.html an of course failing. That happens because there is no way right now to pass options to engines. So... I found two ways of fixing the issue - 1) fix it on ECT side and check if root path wasn't set figure out prefix path for the first template which was passed into render function, get beginning path and assign it to the root. 2) Add engine settings parameter to render in co-views, co-render engine call and ect within consolidate (with proper fallback for backwards compatibility). First approach would require less changes, but doesn't fix the root of the issue. Second approach opens possibility to adjust other engines as well.I already have fixes and can create requests. Please let me know what you think.
I'll also reference that issue at ect repository to see what creator thinks about it.
Thank you