The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

quickSearch template for documentation theme

AlexH
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
July 27, 2011

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

<confluence-install>/confluence/template/includes/macros.vm

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

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Answer accepted
AlexH
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
August 15, 2011

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:

Confluence_install\confluence\WEB-INF\classes\com\atlassian\confluence\setup\atlassian-bundled-plugins.zip

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

doctheme/decorators/main.vmd

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')'/>
#end
<fieldset>
<input type="hidden" name="spaceSearch" value="$docThemeHelper.isSpaceSearchEnabled($spaceKey)"/>
</fieldset>
<fieldset>
<legend>$action.getText('quick.search.legend')</legend>
<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>
<fieldset class="hidden parameters">
<input type="hidden" id="quickNavEnabled" value="$!settingsManager.globalSettings.enableQuickNav" />
#if (!$settingsManager) <!-- Quick nav disabled. SettingsManager could not be found --> #end
</fieldset>
</form>

With our customized search form:

<form id="quick-search" class="quick-search" method="get" action="http://gsa.company.net/search">
<fieldset>
<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"/>
</fieldset>
</form


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.

TAGS
AUG Leaders

Atlassian Community Events