quickSearch template for documentation theme

We replace the normal "macro(quickSearch)" template as defined in:


With our own template that directs user search queries to a custom Google Search Appliance.

However, when we upgraded from 3.1.2 to 3.5.6 the new Documentation theme ignores the quickSearch template in the macros.vm file in favor of something else.

Can anyone tell me where the documentation theme is pulling its quickSearch template from?

1 answer

1 accepted

With a little guidence from Atlassian Support I found out that the Documentation theme is actually a bundled plugin located in a jar (doctheme-1.9.jar) inside:


I ripped this jar apart and found main.vmd inside the jar at:


I replaced the following section:

    <form id="quick-search" class="quick-search" method="get" action="$req.contextPath/dosearchsite.action">
#if ($sitemeshPage.getProperty("page.spacekey") && $docThemeHelper.isSpaceSearchEnabled($spaceKey))
<input type='hidden' name='where' value='$generalUtil.htmlEncode($sitemeshPage.getProperty("page.spacekey"))'/>
<input type='hidden' name='tooltip' value='$action.getText('doctheme.search.tooltip')'/>
<input type="hidden" name="spaceSearch" value="$docThemeHelper.isSpaceSearchEnabled($spaceKey)"/>
<input class="quick-search-query" id="quick-search-query" type="text" accessKey="$action.getTextStrict('search-pages-action.accesskey')" autocomplete="off" name="queryString" size="25"/>
<input class="quick-search-submit" id="quick-search-submit" type="submit" #if ( ($spaceKey) && $docThemeHelper.isSpaceSearchEnabled($spaceKey)) value="$action.getText('doctheme.space.search.name')" #else value="$action.getText('doctheme.global.search.name')" #end/>
<div class="aui-dd-parent quick-nav-drop-down"><!-- Quick nav appears here --></div>
<fieldset class="hidden parameters">
<input type="hidden" id="quickNavEnabled" value="$!settingsManager.globalSettings.enableQuickNav" />
#if (!$settingsManager) <!-- Quick nav disabled. SettingsManager could not be found --> #end

With our customized search form:

<form id="quick-search" class="quick-search" method="get" action="http://gsa.company.net/search">
<input type="text" value="" maxlength="255" size="25" name="q"/>
<input type="hidden" value="wiki" name="site"/>
<input type="hidden" value="wiki_fe" name="client"/>
<input type="hidden" value="wiki_fe" name="proxystylesheet"/>
<input type="hidden" value="xml_no_dtd" name="output"/>

Then I rejar'd the files and uploaded/installed a new version of the doctheme plugin (doctheme-1.9-gsa.jar) via the UPM interface.

Clearly this means I've signed up to re-customize the doctheme plugin everytime Atlassian releases updates, but at least search is once again consistent for us across all confluence themes.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jul 10, 2018 in Confluence

We want to see the templates you've created in Confluence!

Hi Community, Jessica here from the Confluence Product Marketing team!  July’s community challenge is all about sharing pictures  — and as an extension of our first post on what ...

746 views 22 12
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