Is there a way to use the @resource.javascript feature in a custom theme? It appears that it attempts to load from the classpath and that doesn't work for /themes/<theme_name>/ paths.
Hi,
I actually was able to achieve this with a very simple "Hello World" type test, so I did confirm that it will work. However, my test doesn't confirm that it will work for all usages. Can you describe how you are using the @resource.javascript tag?
Regards,
Karl
Thanks for the response.
The use was in a theme using 2.5.2 version of clearspace.
Simple use. It was in the themes directory in the template.ftl file. path: <theme_name>/template/decorator/default/template.ftl
The @resource call looked like this:
<@resource.javascript file="/template/scripts/showHide.js" header="true" />
Originally this ftl file and template directory was embedded in a plugin under the resources directory of the plugin. It was moved to a standalone theme (recommended practice I believe). At that point it would fail to load. Perhaps the full path has to be coded when it is in the themes directory such that it would be (/themes/<theme_name>/template/scripts/showHide.js).
Tested it with the full theme path and it still errors out.
ERROR file.DefaultResourceLoader - An Exception occured loading resource /themes/<theme_name>/template/scripts/showHide.js
Hi,
I am also having a problem loading a javascript file from the tag, though the script runs fine if I put the code directly in my FTL. Let me see if I can find out anything else about this problem.
Just to clarify, you said that this did work when you had it running as a plugin?
Regards,
Karl
Well it worked in 2.0.4 when the theme directory was in the resources folder
of a plugin. So yes.
From: Karl Cyr <communities@jivesoftware.com>
Reply-To: communities <communities@jivesoftware.com>
Date: Wed, 15 Oct 2008 15:02:22 -0700
To: Kevin Brown <kbrown@solutionset.com>
Subject: http://www.jivesoftware.com/jivespace/message/132324#132324/Developers New message: "Use @resource.javascript in custom theme"
http://www.jivesoftware.com/jivespace/message/132324#132324/1UUsLu-9aI-ypm
>
whoiskevin,
>
A new message was posted in the thread "Use @resource.javascript in custom
theme":
>
>
Author : Karl Cyr
Profile : http://www.jivesoftware.com/community/people/karlcyr
>
Message:
Hi Karl,
I'm now encountering the same issue in SBS 3.0.4.
Was there a resolution to this problem?
Thanks,
Ben.
Jive combines the most powerful features of collaboration software, community software,
social networking software & social media monitoring into the leading SBS solution.
© Copyright 2000–2010 Jive Software. All rights reserved.
915 SW Stark St., Suite 400, Portland, OR 97205
Sales: 877-495-3700 | General: 503-295-3700
Privacy Policy | Sitemap | Jobs | Contact Us