I tried to get the the small Web Item Plugin Module
example working in Stash 2.10.1 and failed. I don't get any visible web item for both examples (header bar and admin are).
Is this example compatible with Stash?
Is the atlassian-plugin.xml all i need for this web item?
Where does the text "Google" come from? Why is the label tag empty?
Don't see any further information on the page.
Community moderators have prevented the ability to post new answers.
Hi Andreas,
If you want web.items (as opposed to web.panels) you can add ?web.items to the URL. You've probably seen the Stash documentation? You might also be interested in this example plugin:
https://bitbucket.org/atlassian/stash-example-plugin/src/ee916cc40d7fa5157ebc424f4ca0283b45bb2323/src/main/resources/atlassian-plugin.xml?at=master
In relation to the header example it looks like Stash has headr.global.primary.logo, header.global.primary and header.global.secondary (but I suggest having a look yourself locally). There's no "system.header" if that's what you tried.
Does that help?
Charles
PS. Your example worked for me, I'm not quit sure what you mean about "without the contained text" - what would you expect?
I was confused by the naming of "?web.items" but know i understand what they are for.
I had to place the label text between the label tags:
<
label
key
=
"item.google.home.label"
>Test</
label
>
The google example was without any content in the label tag so i think, i maybe got the i18n wrong.
Does the google link example use i18n via the <pluginName>.properties or is my comprehension wrong for this usecase?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The text of any i18n property is picked up across all of the i18n files. You can add your own if you like by including:
<resource type="i18n" name="My i18n" location="a.b.C" />
And Stash will look for "a/b/C.properties" and the corresponding language files (eg. "a/b/C_fr.properties").
If the key can't be found it should use the text in the body of the <label/> element.
Charles
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.
I managed to get one web item working:
<atlassian-plugin name="Hello World Plugin" key="example.plugin.helloworld" plugins-version="2"> <plugin-info> <description>A basic web item module test</description> <vendor name="Atlassian Software Systems" url="http://www.atlassian.com"/> <version>1.0</version> </plugin-info> <web-item key="google_home" name="Google Home" section="stash.repository.nav" weight="1000"> <description key="item.google.home.desc">Simple link to google.com.</description> <label key="item.google.home.label">Test</label> <link linkId="google_home">http://google.com</link> </web-item> </atlassian-plugin>
The section is no context listed here: https://developer.atlassian.com/stash/docs/latest/reference/web-resource-contexts.htmlBut "
stash.repository.nav" is the only context I get a web item working with.
The label tags contain text. Without the contained text only blank space is displayed.
How do I get the possible locations for the web item's section attribute? I tried to find locations with the ?web.panels URL option and found the "stash.repository.nav.*" that I used for the code above.
What did I get wrong?
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.