Posted by
Firas A.-2 on
URL: http://ofbiz.116.s1.nabble.com/OFBiz-Users-Root-directory-of-the-templates-tp136548p136556.html
David,
I have stuations where I need to include small snippets of a templatized
html in different places. I don't think that the overhead of Screen Widgets
are justified when a simple 'include' is more than sufficient. There are
also situations where I need to include templatized JavaScript files.
So I need to know: How do I include templatized files outside the directory
of the including template?
Thank you!
</Firas>
-----Original Message-----
From:
[hidden email] [mailto:
[hidden email]]
On Behalf Of David E. Jones
Sent: den 22 november 2005 18:30
To: OFBiz Users / Usage Discussion
Subject: Re: [OFBiz] Users - Root directory of the templates
If I were making the choice I wouldn't use JPublish at all... Just use the
Screen Widget.
-David
On Nov 22, 2005, at 10:24 AM, Firas A. wrote:
> Andrew,
>
> Thank you for your time. You're of cource right about path elements
> beign referenced by JPublish's binary code. But as I mentioned erlier,
> these settings are ignored. And to make sure that I wasn't totally
> wrong I changed the 'action-root' path to something really invalid and
> restared OFBiz. After this change OFBiz (front-end/backend) was still
> working.
>
> As I mentioned earlier freemarker template root directory is set by a
> call in org.ofbiz.webapp.ftl.FreeMarkerViewHandler.init():
> config.setDirectoryForTemplateLoading(new File(context.getRealPath
> ("/")))
>
> I guess we need the expertise of one of the gurus.
>
> My regards,
>
> </Firas>
>
> -----Original Message-----
> From:
[hidden email] [mailto:users-
>
[hidden email]] On Behalf Of Andrew Sykes
> Sent: den 22 november 2005 15:15
> To: OFBiz Users / Usage Discussion
> Subject: RE: [OFBiz] Users - Root directory of the templates
>
> Firas,
>
> jpublish.xml is loaded in JPublishWrapper.java, here's an excerpt...
>
> // create the site context
> try {
> //siteContext = new SiteContext(contextRoot,
> servletConfig.getInitParameter("config"));
> siteContext = new SiteContext(contextRoot, "WEB-
> INF/jpublish.xml");
> siteContext.setWebInfPath(webInfPath);
> } catch (Exception e) {
> Debug.logError(e, "Cannot load SiteContext", module);
> }
>
> I guess you don't see the attributes being referenced because it's a
> JPublish binary that actually refers to them.
>
> Kind Regards
> --
> Andrew Sykes <
[hidden email]> Sykes Development Ltd
>
>
> _______________________________________________
> 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