Tag Archives: David Simpson

Searching Atlassian Confluence from an external website

Oliver Marshall asks:

We’re looking at using Confluence for an internal and external knowledgebase. A number of our suppliers use it, so we’re happy it does what we want.

However we want our customers to find common wiki entries via our website, where we send them for various bits of info at the moment.

Other KB/Wiki tools we’ve looked at provide a javascript widget we can include in the site which will give us a CSS’able search box and results. That works nicely.

At a push I’d take the ability to use an iFrame on our site pointing to a basic page with no Confluence navbars or headers (just the page and search bar).

Anyone got any comments or feedback at all on this? Our site is in WordPress if that helps.

This post offers a possible complete working solution for Oliver’s task using PHP.

Here’s a video demonstrating how:

Here’s the source code.

The code reuses the REST API for the quick search dropdown in the standard Confluence search field and as such only returns the first 6 results. You could of course change this to use a different REST API.

 


The AppFusions team provides tough-problem expert-level product development and consulting servicesOur portfolio of solutions is a prime example of our expertise, aside from much other community involvement. Nonetheless, we are only at the beginning of our journey.

Please reach out any time. We know we can help you – it is our relentless obsession and passion!