Hi
I'm transforming our Jpublish Structure into Screens one thing that was quite simple that now seems a bit heavy to me, if I'm not mistaken when I want to include a simple ftl into my page. Before I'd just have to do this ${pages.get("/templates/navg1-img.ftl")} where as now I have to ${screens.render("component://myapp/widget/CommonScreens.xml#navg1-img")} and declare my nav1-img as a screen <screen>....</screen> isn't there a way to go directly to the ftl without passing through a declaration? maybe something like this ${screens.render("/templates/navg1-img.ftl")} Thanks for the help Tibor _______________________________________________ Users mailing list [hidden email] http://lists.ofbiz.org/mailman/listinfo/users |
Hi Tibor,
yes I think that (at the moment) this is the only way to implement 'ftl includes'. Jacopo tibor katelbach wrote: > Hi > I'm transforming our Jpublish Structure into Screens > one thing that was quite simple that now seems a bit heavy to me, if I'm > not mistaken when I want to include a simple ftl into my page. > > Before I'd just have to do this > ${pages.get("/templates/navg1-img.ftl")} > > where as now I have to > ${screens.render("component://myapp/widget/CommonScreens.xml#navg1-img")} > and declare my nav1-img as a screen > <screen>....</screen> > > isn't there a way to go directly to the ftl without passing through a > declaration? > > maybe something like this > ${screens.render("/templates/navg1-img.ftl")} > > Thanks for the help > Tibor > > > ------------------------------------------------------------------------ > > > _______________________________________________ > Users mailing list > [hidden email] > http://lists.ofbiz.org/mailman/listinfo/users _______________________________________________ Users mailing list [hidden email] http://lists.ofbiz.org/mailman/listinfo/users |
Thanks for the answer Jacopo
any idea if this will be implemented in a future release? Thx Tibor On 3/13/06, Jacopo Cappellato <[hidden email]> wrote: Hi Tibor, _______________________________________________ Users mailing list [hidden email] http://lists.ofbiz.org/mailman/listinfo/users |
Just a thought. Then declaration would make it difficult to use
components in other modules. In my stuff, I call screens in other modules, but for the most part to use my own. tibor katelbach sent the following on 3/13/06 3:56 AM: > Thanks for the answer Jacopo > any idea if this will be implemented in a future release? > Thx > Tibor > > On 3/13/06, Jacopo Cappellato <[hidden email]> wrote: > >>Hi Tibor, >> >>yes I think that (at the moment) this is the only way to implement 'ftl >>includes'. >> >>Jacopo >> >>tibor katelbach wrote: >> >>>Hi >>>I'm transforming our Jpublish Structure into Screens >>>one thing that was quite simple that now seems a bit heavy to me, if I'm >>>not mistaken when I want to include a simple ftl into my page. >>> >>>Before I'd just have to do this >>>${pages.get("/templates/navg1-img.ftl")} >>> >>>where as now I have to >>>${screens.render >> >>("component://myapp/widget/CommonScreens.xml#navg1-img")} >> >>>and declare my nav1-img as a screen >>><screen>....</screen> >>> >>>isn't there a way to go directly to the ftl without passing through a >>>declaration? >>> >>>maybe something like this >>>${screens.render("/templates/navg1-img.ftl")} >>> >>>Thanks for the help >>>Tibor >>> >>> >>>------------------------------------------------------------------------ >>> >>> >>>_______________________________________________ >>>Users mailing list >>>[hidden email] >>>http://lists.ofbiz.org/mailman/listinfo/users >> >> >>_______________________________________________ >>Users mailing list >>[hidden email] >>http://lists.ofbiz.org/mailman/listinfo/users >> > > > > ------------------------------------------------------------------------ > > > _______________________________________________ > Users mailing list > [hidden email] > http://lists.ofbiz.org/mailman/listinfo/users _______________________________________________ Users mailing list [hidden email] http://lists.ofbiz.org/mailman/listinfo/users |
This type of simple declaration made it possible and easy to distribute into templates (ftl) other sub FTLs (parts of pages which do not need any processing, and duplicated many times).
To do this now, that same sub FTL must be declared as a screen. It doesn't ask much effort but just seems to be unecessary declaration compared to a one line include where the ftl template is needed. Tibor On 3/13/06, BJ Freeman <[hidden email]> wrote: Just a thought. Then declaration would make it difficult to use _______________________________________________ Users mailing list [hidden email] http://lists.ofbiz.org/mailman/listinfo/users |
In reply to this post by Jacopo Cappellato
Tibor, Actually this isn't quite correct. If you don't need any data preparation or other facilities in the screen widget you can always use FreeMarker's built in include mechanism (the #include directive). There is documentation about it on the freemarker.org site. -David Jacopo Cappellato wrote: > Hi Tibor, > > yes I think that (at the moment) this is the only way to implement 'ftl > includes'. > > Jacopo > > tibor katelbach wrote: >> Hi >> I'm transforming our Jpublish Structure into Screens >> one thing that was quite simple that now seems a bit heavy to me, if I'm >> not mistaken when I want to include a simple ftl into my page. >> >> Before I'd just have to do this >> ${pages.get("/templates/navg1-img.ftl")} >> >> where as now I have to >> ${screens.render("component://myapp/widget/CommonScreens.xml#navg1-img")} >> and declare my nav1-img as a screen >> <screen>....</screen> >> >> isn't there a way to go directly to the ftl without passing through a >> declaration? >> >> maybe something like this >> ${screens.render("/templates/navg1-img.ftl")} >> >> Thanks for the help >> Tibor >> >> >> ------------------------------------------------------------------------ >> >> >> _______________________________________________ >> Users mailing list >> [hidden email] >> http://lists.ofbiz.org/mailman/listinfo/users > > > _______________________________________________ > Users mailing list > [hidden email] > http://lists.ofbiz.org/mailman/listinfo/users _______________________________________________ Users mailing list [hidden email] http://lists.ofbiz.org/mailman/listinfo/users |
In reply to this post by oceatoon
Thx Chris for the advice
I'll be going with Screens, David even submitted the solution to my initial question. which is using Freemarker <#include method to insert snippets. Best regards Tibor
On 3/13/06, Firas A. <[hidden email]> wrote: Hi Tibor, _______________________________________________ Users mailing list [hidden email] http://lists.ofbiz.org/mailman/listinfo/users |
In reply to this post by David E. Jones
Thanks David
Exactly what I was looking for. but offcourse I should have known to look in the freemarkers lib. Best Regards Tibor On 3/13/06,
David E. Jones <[hidden email]> wrote:
_______________________________________________ Users mailing list [hidden email] http://lists.ofbiz.org/mailman/listinfo/users |
Free forum by Nabble | Edit this page |