These are examples of how to design your search results.
In this example, a table is used to lay out the search results.
| Design field | Details | 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. |
In this example, a table is used to lay out the search results.
| Design field | Details | Code example |
|---|---|---|
| Header | <table> |
|
| Result | The attributes to display in each search
result are defined here. When displaying search results in a rendering portlet you must specify the page that the linked content is 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. |