Hello. Thanks for reading!
I am trying to add a simple searchbox above the Page Tree in the sidebar when using the confluence default theme. We're already heavily invested in configuring this theme to our liking and this is one of the final steps.
Thanks in advance!
Go to Page Layout and may be modify this as below
#if( ($mode != "edit" && $mode != "edit-preview" )) <content tag="ia-sidebar"> #foreach ($webPanel in $webInterfaceManager.getDisplayableWebPanels("atl.page.left.sidebar", {"page": $confPage, "context": $context})) <br/><br/> $!webPanel.getHtml($action.context) <br/><br/> #end $helper.renderConfluenceMacro("{livesearch:spaceKey=TES|size=medium|placeholder=Search this space}") </content> #end
Thanks! The line breaks only move the searchbox down so I have to find a way to squeeze it in but this works. Thank you again.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Matt, did you ever figure out how to tweak this so it looks right in the sidebar?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Matt,
You can give it a try with this, use $helper.renderConfluenceMacro in your layouts to render Confluence macros, for example: Use Confluence livesearch macro
$helper.renderConfluenceMacro("{livesearch:spaceKey=DOC|size=large|placeholder=Search this space}")
Taha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for that, Taha. Unfortunately, I still can't get any code (or text for that matter) to show up on the Confluence sidebar. I've tried editing the Space layout, the Page layout as well as multiple .vm files. Can you point me to which file it is that spits the code out for the sidebar? Thanks again for your assistance. It's much appreciated
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.