Spice up your search results view in UCM
By Kyle Hatlestad on Jan 27, 2010
One of the things that I use on our internal UCM instance here at Oracle is my own custom search results view. I like the standard Headline View because each result is a nice, concise display for each document. But what I don't like about it is the lack of information about the document. I can add additional columns, but that can quickly hit a limit given the width of results.
So what I've done is try and combine the best of both worlds. My initial results that comes back looks just like the regular Headline View.
But if I simply click on the Title in the results, it expands and shows additional information that I want to get at. And in addition to that information, I can present actions that may only be available on the Content Information page. Or even actions that aren't available in either place (like delete all revisions).
So when you customize a search result, it lets you insert code right into the Description field to add this type of functionality. And when you show additional options, it lets you insert code that would go above the search results.
To make this somewhat portable, I have all of my code in an .idoc file that I have checked in. Then I use the docLoadResourceIncludes() function in the additional options area to pull in the resources. That way if I want to reuse this on another instance, or share this with someone else to use, it's just a few lines of code that need to be added.
For those interested in these results, here is a copy of my. To create the custom view:
- Check in the .idoc file. Make note of the Content ID for it.
- On the Search Results page, select View -> Customize.
- Add a new Headline View template. Give it a name and ID.
- For Customize Columns, select Content ID and Description.
- Check the 'Use Advanced Description Form' check box.
- In the Customize Description Column text area, enter:
- Click the 'show additional options' link.
- In the text area that appears below, enter:
You'll want to change the dDocName parameter to the Content ID of the .idoc file that was checked in.
- Save the template.