+

Search Tips   |   Advanced Search


Search result examples

These are examples of how to design your search results.


Search element design example for use in a Web site

In this example, a table is used to layout the search results.


Table 1. Search element design example for use in a Web site

Design field Code example
Header

<table>
Result

The attributes to display in each search result are defined here.

<tr><td>
    <attributeResource attributeName="namelink"/><br>
    <attributeResource attributeName="summary"/>
</td></tr>
Separator

A separator can be used to delineate each search result.

<tr> <td  bgcolor="#FFFAA" colspan="2"/>  </tr>
Footer

A page navigation element stored in a component is referenced here to add page navigation to the search results.

    <tr><td>
        <component name="pagenavigationcomponent"/>
    </td></tr>
</table>
No results There are no results for your query. Please refine your search and try again.


Search element design example for use in a rendering portlet

In this example, a table is used to layout the search results.


Table 2. Search element design example for use in a rendering portlet

Design field Code example
Header

<table>
Result

The attributes to display in each search result are defined here.

When displaying search results in a rendering portlet specify the page that the linked content will be displayed in when opened.

A URL map to the portal page that contains the rendering portlet is required.

<tr><td>
<a href="/[PORTAL_CONTEXT_ROOT]/
[PORTAL_PAGE_URL_MAPPING]/?WCM_GLOBAL_CONTEXT=
<AttributeResource attributeName="url" />">
<AttributeResource attributeName="title" /></a>
<attributeResource attributeName="summary"/>
</td></tr>
Separator

A separator can be used to delineate each search result.

<tr> <td  bgcolor="#FFFAA" colspan="2"/>  </tr>
Footer

A page navigation element stored in a component is referenced here to add page navigation to the search results.

    <tr><td>
        [component name="pagenavigationcomponent"]
    </td></tr>
</table>
No results There are no results for your query. Please refine your search and try again.


Parent topic:

Display search results