Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Customizing search results layout in custom theme

Jason Hensler
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 Leaders.
October 13, 2013

Hello all,

I'm working on an internal custom theme for our sales departments. I am in the process of re-creating the custom layout from our version 3.5 install in our new install of 5.3. In version 3.5 the search results would be themed by customizing the space layout (or global layout I can't remember which now), it would appear that in version 5.3 this is no longer the case. I am creating a custom plugin instead of editing the site layout sheets with-in a space. I have tried to override the default search.vmd file by adding to my atlassian-plugin.xml file:

<layout key="Search" name="Search Decorator" class="com.atlassian.confluence.themes.VelocityDecorator" overrides="/decorators/search.vmd">
			<resource type="velocity" name="decorator" location="/includes/cbc-search.vmd"/>
		</layout>

This did not work. Since we want to only have specific spaces use this theming in the search results, I don't want to modify the system wide decorator. Does anyone have an idea how I can override this in my custom theme plugin?

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Answer accepted
Jason Hensler
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 Leaders.
November 25, 2013

Does not seem to be possible to theme the search results in the same why that it was possible to do so, in version 3.5. We just left the search results as the default theme.. It does appear that we could modify the global search decorator on the disk.

Ali January 12, 2014

Did you ever find a solution to this, i.e., applying a custom search results decorator to a particular space within a Confluence site?

Jason Hensler
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 Leaders.
January 12, 2014

No, I gave up on finding a solution. I couldn't think of a way to make it work. I was thinking of modifying the search.vmd to pick up on which space the search was from in the search.vmd and include a per space css file but, I couldn't find a good way to do this. I suppose you could change the header in each space to (by default) pass the space or space key to the search and pick up on it that way but, this would be unreliable and require that the users not remove the space key from their search query. Sort of creating a custom plugin (not theme), I don't see this being possible.

TAGS
AUG Leaders

Atlassian Community Events