I have a soy file that works fine, apart from the CSS style I'd like applied is ignored.
I suspect the CSS file is not imported into the page when loaded.
This is the line I have, the css-style is called 'urlwidth'
<input id="vname" class="text urlwidth" type="text" name="vName">
The css file looks like this... (simplebp.css)
.urlwidth
{
max-width: 350px;
}
I presume I'm meant to add a resources line to the soy file like this...
{webResourceManager_requireResource('com.example.plugins.tutorial.confluence.simplebp.simplebp:create-by-sample-template:simplebp-resources')}
I'm just not sure what the syntax is that I'm meant to put in the webResourceManager_requireResource.
webResourceManager_requireResourcefunction takes one parameter which is a (web resource) module key. As per web resource module documentation: "Web Resource plugin modules allow plugins to define downloadable resources"You can define a web resource in your plugin descriptor (/src/main/resources/atlassian-plugin.xml):
Assuming your plugin's code is laid out using the Standard Directory Layout the
my-css.cssfile should be in<project>/src/main/resources/css/directory.The resource then can be referenced in the soy template by identifier of form
<plugin-key>:<resource-key>:Reference: webResourceManager_requireResource function implementation