ofbiz-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Todd Thorner <tthor...@infotinuum.com>
Subject Re: *.html file rendering in OFBiz screen
Date Mon, 11 Dec 2017 18:30:29 GMT
+1 ... although this might be a better thread for the dev mailing list.


Bottom line: never try to make your customers adjust their processes 
&amp; prerogatives to match your product/service, because that's how 
bureaucracies conduct themselves.



On 17-12-11 08:00 AM, Amit Gadaley wrote:
> 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.


Mime
View raw message