cancel
Showing results for 
Search instead for 
Did you mean: 

Customize detailed view of search result

jakeer
Champ on-the-rise
Champ on-the-rise
I want to display my custom fields in detailed view. I managed to display custom fields in detailed view in "document library" using below code writing to share-config-custom.xml file

<config evaluator="string-compare" condition="DocumentLibrary">
<metadata-templates>
<template id="default">
<banner index="10" id="lockBanner" evaluator="evaluator.doclib.metadata.hasLockBanner">{lockBanner}</banner>
<banner index="20" id="syncTransientError" evaluator="evaluator.doclib.metadata.hasSyncTransientErrorBanner">{syncTransientError}</banner>
<banner index="30" id="syncFailed" evaluator="evaluator.doclib.metadata.hasSyncFailedBanner">{syncFailed}</banner>
<line index="10" id="date">{date}{size}</line>
<line index="20" id="description" view="detailed">{description}</line>
<line index="30" id="tags" view="detailed">{tags}</line>
<line index="40" id="categories" view="detailed" evaluator="evaluator.doclib.metadata.hasCategories">{categories}</line>
<line index="50" id="social" view="detailed">{social}</line>
</template>

<template id="cp">
<evaluator>evaluator.doclib.indicator.DocAspectMetadata</evaluator>
<banner index="10" id="lockBanner" evaluator="evaluator.doclib.metadata.hasLockBanner">{lockBanner}</banner>
<banner index="20" id="syncTransientError" evaluator="evaluator.doclib.metadata.hasSyncTransientErrorBanner">{syncTransientError}</banner>
<banner index="30" id="syncFailed" evaluator="evaluator.doclib.metadata.hasSyncFailedBanner">{syncFailed}</banner>
<line index="10" id="date">{date}{size}</line>
<line index="20" id="tags" view="detailed">{tags}</line>
<!–<line index="20" id="description" view="detailed">{description}</line>–>
<!–<line index="40" id="categories" view="detailed" evaluator="evaluator.doclib.metadata.hasCategories">{categories}</line>–>
<line index="30" id="cost" view="detailed">{CP_Cost Cost}</line>
<line index="40" id="travel" view="detailed">{CP_DeliveryMode Delivery Mode} </line>
<line index="50" id="level" view="detailed">{CP_baselocation Base Location}</line>
<line index="90" id="social" view="detailed">{social}</line>
</template>
</metadata-templates>

But it is not effecting in search result. I mean I am unable to display custom fields(custom aspect fields) in search result list's detailed view. Could some guide me how I can achieve this.

Thanks in Advance
2 REPLIES 2

jakeer
Champ on-the-rise
Champ on-the-rise
I managed to add my custom field in search.get.json.ftl, search.lib.js files. Using the fire bug am able to see the value of my custom field in the ajax call made. Now, how can I add the custom field to display in the search result?

Thanks in advance