Gliffy Diagrams in Search Results

Our organization could benefit from the ability to search for terms within Gliffy Diagrams. The Confluence search function provides this feature, but the gliffy diagram search results that are returned are HTML files. 

Ideally this search result would link to the page which the gliffy diagram resides in or the gliffy diagram itself, opened with Gliffy. Instead, the page which is opened is HTML code. Is there a way to change this behaviour?

4 answers

1 accepted

We wrote a quick and a little bit dirty workarround script: 

If a user clicks on the search result the wiki page that contains the gliffy is opened. 

You can add this script to Settings -> Custom HTML -> At end of the BODY.

<script>
jQuery(function(jQuery){
jQuery("body").on("click","a.search-result-link.visitable",function(e){
e.preventDefault();
var current = jQuery(this);
var href = current.attr("href");
jQuery.getJSON(contextPath+href, function(data){
if(data.contentType == "application/gliffy+json"){
var gotogliffy = current.closest("li").find("a.container").last();
window.location = contextPath+gotogliffy.attr("href");
}else{window.location = contextPath+href;}
}).fail(function(){window.location = window.location = contextPath+href;});
return false;
});
});
</script>

Hello Greg,

The API hook that enabled this functionality has been removed since Confluence 5.2. We've raised the issue with Atlassian, but unfortunately there are no plans for a fix. You can view the full details of the problem here: https://jira.atlassian.com/browse/CONF-34892 Feel free to watch, vote, and comment on the issue.

The current workaround is to click the small, gray link below the search result description.

Regards,

Mike Cialowicz

Gliffy, Inc.

@Mike Cialowicz: is there way for plug-in to control link presented to a user by search? In that case link to a viewer could be provided instead of a file? Like https://confluence.company.com/plugins/gliffy/viewer.action?inline=false&attachmentId=56328277&name=test instead of https://confluence.company.com/download/attachments/56098836/test?version=2&modificationDate=1443611832573&api=v2 ?

@Mike Cialowicz, I would like to raise your attention concerning this issue again. Is there a workarround for search result display?

Hi Philipp, The current workaround is to click the small, gray link below the search result description in order to navigate to the page containing the Gliffy diagram. Regards, Mike Cialowicz Gliffy

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Kesha Thillainayagam
Posted Apr 13, 2018 in Confluence

We want to hear how your non-technical teams are using Confluence!

Hi Community! Kesha (kay-sha) from the Confluence marketing team here! Can you share stories with us on how your non-technical (think Marketing, Sales, HR, legal, etc.) teams are using Confluen...

2,856 views 27 11
Join discussion

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you