Hello Everyone,

OFBiz only supports the rendering of *.ftl files in OFBiz screens.
*.ftl files are same as *.html files with richer capabilities but sometimes
there are situations where a user needs to render only *.html files instead
of *.ftl files.

I have debugged the code and figure out that method '*renderHtmlTemplate*'
of HtmlWidget.java is responsible for rendering *.ftl files. I walked
through it and met with this condition:

if (location.endsWith(".ftl")) {
     // render file
} else {
    //return error
}

My proposal is to update this condition like this:

if (location.endsWith(".ftl") || location.endsWith(".html")) {
     // render file
} else {
    //return error
}

I have tested it and it is working fine. I don't see any harm in this
change.

Please share your inputs on this.
-- 
Thanks and Regards,
*Amit Gadaley <https://about.me/amit_gadaley>* | Senior Enterprise Software
Engineer
HotWax Commerce <http://www.hotwax.co/> by HotWax Systems
<http://www.hotwaxsystems.com/>
Plot no. 80, Scheme no. 78 Part 2, Near Brilliant Convention Center, Indore,
M.P., India - 452010
Cell phone: +91 958.459.3069

<https://about.me/amit_gadaley?promo=email_sig>

Reply via email to