We would like to insert images as links and when the user clicks on them, to display the image as a popup. We cannot seem to accomplish this behavior. Are only options appear to be:
The reason we didn't want to go with the thumbnail is because of real estate. We have these links in a column to reference flow diagrams. And the thumbnail takes up significant space in the cell, when we have 10 columns and many, many rows.
Does anyone have any other ideas how to accomplish our desired user experience?
Funnily enough, I was writing something not that different earlier on.... ;-)
You can do it as a user macro which users can populate via the macro browser. here's the code:
## Macro title: Image Popup ## Macro has a body: Y ## ## Developed by: Matthew Cobby matt@andamooka.com ## @param ImageName:title=Image|type=string|required=true|desc=Nname of attached image to display ## Get basic manager objects first #set($attachmentManager=$content.getAttachmentmanager()) ## Get the attachment - assuming it's an image! #set($attachment=$attachmentManager.getAttachment($content, $paramImageName)) #set($downloadPath=$attachment.getDownloadPath()) <span class="image-wrap" style=""><a class="confluence-thumbnail-link" href='$downloadPath'>$body</a></span>
You also want to set the Macro Body processing to: "Convert wki markup to HTML" so users can put what ever they want as the actual link
Then the usage would be:
{imagepopup:ImageName=myimage.jpg}My Link Text{imagepopup}
You could write another version which took images from another space & page but it's more complex and users would have to put in more parameters.
and I've just realised your using onDemand. Oh dear.
the limitations of a hosted service mean, I think, you can't create user macros....
User macros are simple template-like macros that allow you to create simple formatting macros using the Confluence web interface. Read more about Writing User Macros. Not applicable to Confluence OnDemand.
https://confluence.atlassian.com/display/AOD/Working+with+Macros
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, we are OnDemand and unfortunately are not able to implement user macros either :-(
However, what you have provided is still beneficial to us as we are trying to move away from OnDemand. Thus, I'm going to definitely hold on to this post/solution for when (I hope) we are able to migrate off of OnDemand by 1Q2013.
Thanks for taking the time to respond and provide this option!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes - I can insert the image as an 'attachment' which is the linked text that replaces the page with the image, in this case, when clicked or if I insert as a very small image, then it pops up and you don't lose context. My desired behavior is that when the user clicks on the linked text which is actually an image, that the image not replace the entire web page. I prefer it display as a popup or, if necessary, a new page, so the user doesn't lose context. Does that help or make better sense?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Just tio check, you are talking about having a text link, linking to an image.Is the popup inline or in a new tab/browser?
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.