How can I add a livesearch field to the sidebar

I've tried adding the livesearch to the sidebar of the default theme but it doesn't render well. The search field is too wide using the 'medium' size and too large using the 'large' size. 

How can I fix this?


I'm using confluence ondemand

2 answers

Hi Tom, I have a similar issue so I am interested in any responses you get!


i changed the Page Layout Decorator (under Space Tools -> Look and Feel) and added a small piece of code

>#if ($mode == "view")
>    #requireResourcesForContext("pagebanner")
>    <content tag="page-metadata-banner">
>        #skiplink("page-banner", >$i18n.getText(""), >$i18n.getText(""))
>            #webPanelForLocation("", {"action": $action})
<!-- Here goes the livesearch-macro  -->

<div id="any_id">
  $helper.renderConfluenceMacro("   {livesearch:spaceKey=your_space_key|size=small|placeholder=Search...}")


In the same decorator-File i added a small javascript to change the possition of the Searchbox like this:

<script type="text/javascript">


Then use some CSS styles to change the look of the searchfield.

So this solution works for me. Maybe there are some better "not-so-dirty" - hacks.



Hi Thomas... It looks like this isn't available in OnDemand (I am using OnDemand, as is Tom who is the original poster). Can you see the Page Layout Decorator, Tom?

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...

1,159 views 22 10
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