HI
I'm Creating a xhtml macro in confluence 4.3.2.
I would like to include a css for this macro.
So i added a webresource module in atlassian-plugin.xml file and added '#requireResource('full qualified module key')'
Unfortunately i'm unable to get the css work in the .vm file. The vm file rendered with out any css.
I also tried adding the web resource in the execute method too, like below.
webResourceManager.requireResourcesForContext("com.ca.usertabs.UserTabs:usertabs");
In above 'com.ca.usertabs' is Group Id, 'UserTabs' is artifactId and 'usertabs' is the web resource key.
What i'm doing wrong?Please help us to add the css to my macro.
Community moderators have prevented the ability to post new answers.
I would recommend defining your own context for your macro resources:
<web-resource key="usertabs-resources" name="usertabs-resources"> <resource type="download" name="usertabs.css" location="styles/usertabs.css"/> <context>com.ca.usertabs.usertabs</context> </web-resource>
and include this line in your velocity template:
#requireResourcesForContext("com.ca.usertabs.usertabs")
Seems it is pretty much working. Will try the above code and update.
Thanks for your support.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.