Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,298,608
Community Members
 
Community Events
165
Community Groups

An simple dropdown where links can be added

Hello,

 

I would like to ask you, if you can provide an user macro that would make it possible to create a simple dropdown where the user can fill in the title and add elements for the dropdown (in edit mode). I would need that links could be used.  I found several macros, but either there was no option to add dropdown elements for the user himself or a link could not be used. Maybe it could be like a dropdown made of buttons (links), of course it has to be filled in by the user in edit mode.

 

Thanks very much

Alex

2 answers

1 vote

Hello @Charles Licata and @Wiki Support ,

I see that you haven't found a solution for your request here. So I could suggest a workaround for you. As I see it you need to create a noticeable clickable link on your Confluence pages. I believe Handy Button can work for your use case. It is one of many macros from our Handy Macros for Confluence app. You can also create drop down menus with its Handy Status but without a link attached.

Hope that could help you find a solution.

0 votes

A drop-down implies a pre-filled list, which doesn't really lend itself to links.

Have you tried using simply the [ to create links?

Hi Nic,

as I am as green as a tree in this I did not try markup for my use. I try to describe it a bit, I want to create a user macro that allows the user to create a dropdown list which he can fill with links, that will be visible as button. One field could be URL and the other Title so he can name his link for the list. Sadly I was not successful with my custom code (as it was just glued together code I found)

If there would be a fee plugin which would do the same I would gladly use it. None I know did meet my expectation.

 

Alex

Ok, I'm still lost on "dropdown" and "links" - a link is a free-form line of text that points to a resource somewhere else.   A drop-down is generally a selection from a pre-set list of items.

The [ link notation in confluence allows for links to be given names - for example Mr Flibble links back here, and it can point at attachments or other Confluence pages without needing a full url. 

So I'm a bit stuck on imagining what you're looking for.  Is it something that tries to construct a url for you?  Like "select a server, a name and a string, and I'll generate a link to another system that uses that structure for its links"?

The user has to be able to create that pre-set list of items in the user macro edit. You are right, it should be a link notation, but somehow the syntax does not work, if I use [Google|www.google.com] it wont show at all in the macro. Maybe I use the [ not how I should .

 

I still don't grasp what you're trying to do with a drop down or list - what are you expecting it to give to the user?

When you put in a [ you should get a menu pop-up - that can help a user construct the right syntax for a link - it makes suggestions based on their recent history and allows for a search

Dropdowntest.jpg

 

This is an user macro that is made of two parts, first one that creates an dropdown. A second part that creates the elements to populate the dropdown. I search for a single macro that would have the same functionality. (the items in the dropdown are clickable links)

I'm sorry, I still really don't get what you're trying to achieve with this.

Hi Nic,

me again smile so to describe it I will show you my test dropdown,it is made in HTML but I would love to have it as a macro.

<select id="foo">

<option value="">Pick a site</option>

<option value=http://www.google.com>Google</option>

<option value=www.yahoo.com>Yahoo</option>

</select>

<script> document.getElementById("foo").inchange = function () {if (this.selectedIndex!==0) {window.location.href = this.value; } } ; </script>

 

the User should be able to add a new Option(line) and the Name and destination of the line. So basically I need a dropdown menu that can have customizable links in it.

Thank you for your time,

 

Alex

Hi Nic,

 

how do things look? Were you able to create such a macro or point me in the direction what commands to use?

 

Alex

Sorry, I missed your last update.  I think I can see what you're aiming for, but I don't see a use for it - a drop-down should provide a fixed list of options for a user to select from ( a user macro can implement those as options in its config) and a free-form url is a simple web-link that Confluence already supports.  If a user needs a preset, get them to use the macro.  If they need something that's not on the list, get them to use [

Hi Nic,

 

thanks for the fast answer, it would be great the user to use such a  macro, but the issue is I don't have it. I want a macro that lets the user create a fixed list of options as a dropdown.

 

Alex

You said you already do above.

html code is not enough, I would need it in velocity, with the same functionality as the html. The user should be able to create the fixed list, not me in the macro body. Not all users are able to use a html preset for their needs, the focus is on user friendliness so a markup/velocity user-macro with a  simple dropdown functionality is my goal.

I really don't understand this now.  Could you tell me what you expect a confluence user to see when they are reading the page you want to add this to, and what they get when they edit it?

laugh when they edit it, they see an option to give the list a title, an option to add list items and an href value so links can be used. When they are reading it, they see a button , when clicked it will show a list aka. a dropdown. Like the html I pasted a few messages ago, just in markup/velocity.

Ok, I can't see any way to do that in the view screen without some javascript hacking, but probably more important, I can't see any use for it.  A button that shows a list in a document?  Why?

Hi Nic,

the macro should go to a page to create a menu of some sorts not a document laugh 

I used the html code in the end to create a workaround, the user macro was to complex for me, so thanks for your time. Hopefully we can solve something again in the future, have a nice day

 

Alex

I also have an exact need for this and i can't understand why you even care what his usage is?    Every post you made is "why why why" and "i can't see the usage"  Well in my case we have a client drowndown that we would like to turn into a link to the client's website.  How's that for a usage?

Apologies, deleted reply as this is the wrong forum to ask the question.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Confluence

An update on Confluence Cloud customer feedback – June 2022

Hi everyone, We’re always looking at how to improve Confluence and customer feedback plays an important role in making sure we're investing in the areas that will bring the most value to the most c...

211 views 1 4
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you