ofbiz-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adrian Crum <adrian.c...@sandglass-software.com>
Subject Re: javascript and css directory
Date Sun, 30 Nov 2014 16:22:51 GMT
Adding JS and CSS to a component can be done, but there are no 
instructions for it. There are plenty of examples though.

See the applications/party/webapp/partymgr/static folder. Also note that 
the folder is included in the allowedPaths filter in web.xml.

In addition, each visual theme is a component - and the themes have JS 
and CSS files contained within them.

So, you will need to spend some time reverse-engineering the existing 
examples.


Adrian Crum
Sandglass Software
www.sandglass-software.com

On 11/30/2014 8:23 AM, info@agentur-m3.de wrote:
> Hi All,
>
> I try to create a link for a javascript-file
> in a sub-directory of my compomenent.
>
> So I defined the links with @ofbizUrl or
> @ofbizContentUrl, but they don't give the
> results I did would expect.
>
> <@ofbizUrl></@ofbizUrl>
>
> and
>
> <@ofbizUrl fullPath=true></@ofbizUrl>
>
> give mycomponent/control/
>
> (a /control sub-directory does not exist
> in the component)
>
> and
>
> <@ofbizContentUrl></@ofbizContentUrl>
> <@ofbizContentUrl fullPath=true></@ofbizContentUrl>
>
> both return an empty string.
>
> In a forum post I found a hint, that
> dataTemplateTypeId="FTL" should be defined in the
> components entity definitions to  use
> ofbizurl in freemarker files.
> But I could not find further documentation on that,
> and also in the application-folders it is not
> defined for each application.
>
> Do you know a way to get the base-dir
> of the component as string,
> so that I could define the correct link
> in the freemarker-file?
>
>
> Many Thanks,
> Ralf
>

Mime
View raw message