cancel
Showing results for 
Search instead for 
Did you mean: 

How to display non-standard metadata in search results

aprotogerellis
Champ in-the-making
Champ in-the-making
Hi,

I am hoping somebody can help with the following query:

I am trying to change the metadata fields (properties) displayed in the rearch results (list view). I have managed to add properties from my custom content model using the code below (and some additional code in a couple of the xmls):

<a:column id="col15" style="text-align:left" rendered="#{BrowseBean.browseViewMode == 'details' || BrowseBean.browseViewMode == 'icons'}">
<f:facet name="header">
<a:sortLink id="col15-sort" label="Client Name" value="modified" styleClass="header"/>
</f:facet>
<h:outputText id="col15-txt" value="#{r['dm:Client_Name']}">
</h:outputText>
</a:column>

However, I am struggling with the built-in properties. Again I have managed to add the document title using the code below:

<a:column id="col14" style="text-align:left" rendered="#{BrowseBean.browseViewMode == 'details' || BrowseBean.browseViewMode == 'icons'}">
<f:facet name="header">
<a:sortLink id="col14-sort" label="Title" value="modified" styleClass="header"/>
</f:facet>
<h:outputText id="col14-txt" value="#{r.title}">
</h:outputText>
</a:column>

However, I also want to add a column for content type and one for the remove_after property (introduced by the compliancable aspect)…

Finally, I would very much like to remove the name column, but I can't find any reference to it anywhere - it seems to be there by default.

Any help is much appreciated.

Best regards,
Alex
3 REPLIES 3

kevinr
Star Contributor
Star Contributor
What is the problem you having when trying to add the other properties? The 'removeAfter' datetime value property should be displayed something like this using a date converter:

                           <h:outputText id="colxx-txt" value="#{r['cm:removeAfter']}">
                              <a:convertXMLDate type="both" pattern="#{msg.date_time_pattern}" />
                           </h:outputText>

The 'type' is not a property on a node - so you will need to add a property resolver inner class to the BrowseBean for that - take a look at any of the NodePropertyResolver() inner classes for an example.

Hope this helps,

Kevin

aprotogerellis
Champ in-the-making
Champ in-the-making
Thanks a lot! This works fine.

One more question though, how can I remove the filename column from the results page? I don't see any reference to it in any relevant file whatsoever.

Could it be that it is not refered to as "name" inside the system but something else?

Many thanks,
Alex

kevinr
Star Contributor
Star Contributor
It is the name column - there are three primary columns (one for each view type, they start with these comments around line 270 in browse.jsp:
<%– Primary column for details view mode –%>
<%– Primary column for icons view mode –%>
<%– Primary column for list view mode –%>

Hope this helps,

Kevin