Where to find velocity context variables for a given module?

EddieW
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 12, 2011

I have installed then plugin SDK, and successfulyl walked through numerous tutorials. Maybe I am just dfaft, but I still have no idea where the velocity context variables are set, or what the complete list for a given context is.

For example I know (because a tutorial used it) that $space.key will return the current space's key, but how do I obtain the current server URL, hostname, or protocol (http v https)?

I am trying to write a plugin that will display nav bars in each of the tools, and switch between them

For example, in confluence I can add this simple mneu item, but I can't seem to escape the /confluence portion of the url, and replace with /issues (/jira)

<link>/issues/browse/$space.key</link>


Creates http://mycurrentdoamin/confluence/issues, and not http://mycurrentdomain/issues

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Remo Siegwart
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 2, 2011

The wiki page Confluence Objects Accessible From Velocity gives a pretty good overview of what objects are accessible in which velocity context.

You can get the current context path like this:

$req.contextPath

And the server base url:

$baseUrl

But in your case you probably need to use an absolute link (http://link.to.your.jira/issue).

TAGS
AUG Leaders

Atlassian Community Events