I've got the following Stash plugin module definition:
<web-item key="header" name="My Header" weight="40" section="header.global.secondary"> <styleClass>total</styleClass> <tooltip>Total</tooltip> <resource type="download" name="total.css" location="css/total.css"/> <condition class="com.atlassian.stash.web.conditions.IsLoggedInCondition"/> <context-provider class="plugin.contextproviders.TotalContextProvider"/> <label>$total dollars</label> </web-item>
However, when I start up Stash (atlas-run) the styling I've included in total.css (making the background-color red) isn't being applied. I can't see the total.css file included anywhere when I use Chrome Dev Tools to try and find it, and the style applies fine if I manually edit the css in Chrome Dev Tools.
Any idea why the style isn't being applied and why I can't see the CSS being downloaded/included anywhere?
Hi Annie,
I'm afraid to say that it appears that web-items don't support download resources. You'll have to add the resource another way. You could do that with with an extra web-resource (or stash-resource) with a context (like global or atl.general).
Cheers,
Charles
Hi Annie,
Using atl.general is not recommended, as it adds your resources to every page in Stash. Unless you actually need to target every page, please take a look at https://developer.atlassian.com/stash/docs/latest/reference/web-resource-contexts.html for a more appropriate context (nb: atl.general does not hit admin pages)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey Seb, thanks for the advice. I do actually need it to display on every page - so I guess I should apply it to the atl.general *and* atl.admin.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Annie,
Adding both contexts to your resource is correct then.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.