Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Adding Dynamic Links to User's Top Navigation Bar

Christian Selbrede
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.
July 13, 2012

Following the "Adding you own menu items to JIRA" tutorial, I am trying to figure out how to add dynamic links to my navigation bar.

For example, I have a class that implements the interface:

public interface MyLinkManager{

  Collection<MyLink> getLinks();
}

A MyLink object just has getters and setters for a String name and String url.

Is there a way to do something like this:

for (MyLink link : myLinkManager.getLinks()){

  addToNavbar(link, "dynamic-section");

}

Where addToNavbar is a method that takes a link and a navbar section, and adds the link dynamically to that section?

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

2 votes
Answer accepted
Jobin Kuruvilla [Adaptavist]
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.
July 13, 2012

I have this covered in my book but you can also find the same code in J-favourites plugin.

https://marketplace.atlassian.com/plugins/com.jtricks.favourites

See the source. It is done using simple-link-factory

Christian Selbrede
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.
August 2, 2012

Cool! This looks very helpful. Thank you!

Kinto Soft
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 28, 2012

Very useful description ;)

Link to the book section

Thank you very much!

Jobin Kuruvilla [Adaptavist]
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 28, 2012

Thanks Pablo :)

TAGS
AUG Leaders

Atlassian Community Events