Depending on your environment, you might want to place
the Search Center portlet on a public page of your IBM® WebSphere® Portal and have the search
box in the portal theme take users who do a search to that public
Search Center.
About this task
To do this, you need to create your custom search center
page, place a copy of the Search Center on it, and adapt the file search.jsp accordingly. Proceed as follows:Procedure
- Create your custom search center page. Complete
the fields and select options as required. Make sure to specify a
Search and Tag Center profile for the page as follows:
- If you create the page by using the Manage Pages functionality
in the site toolbar, proceed as follows:
- From the site toolbar, select Page to edit
the new search center page.
- From the General tab, select Edit
Page Properties.
- In the Manage Page Properties window, select
the Advanced tab.
- Scroll to the Metadata section of the Manage
Page Properties window.
- To specify the Search and Tag Center profile for the custom search
center page, add the key resourceaggregation.profile with
the value of profiles/profile_search_tag.json to
the list of key value pairs.
Note: If you created the custom search
center page as a child to the original Search Center page, the Search
and Tag Center profile is inherited from the parent page.
- Click Save.
- If you create the page by using the Manage Pages administration
portlet, proceed as follows:
- Select Edit Page Properties for the page.
- Select Advanced options.
- Select I want to set parameters.
- Add the parameter resourceaggregation.profile with
a value of profiles/profile_search_tag.json .
- Click .
- Add the Search Center portlet to the custom search center
page by completing the following steps:
- From the custom search center page, select the Create tab
in the site toolbar.
- From the Applications tab, select
the Search Center portlet.
- Select Add to Page ... to add
the Search Center portlet to the page.
- To open the Manage Pages portlet, click the
Administration menu icon. Then, click .
- Locate your custom Search Center page in the Manage Pages
portlet.
- Give your custom Search Center page a unique name by completing
the following steps:
- Select Edit Page Properties.
- Specify a value for the Unique name.
- Click OK.
- Give the portlet window for the Search Center a unique
name:
- Select Edit Page Layout.
- From the portlet menu, select Set portlet
window unique name.
- Specify a value for the Unique name.
- Click .
- Change to the directory PortalServer_root/theme/wp.theme.modules/webapp/installedApps/ThemeModules.ear/ThemeModules.war/themes/html/dynamicSpots/modules/search
- Edit the file search.jsp.
- Locate the following code snippet that points to the default Search Center page:
wp.navigationModel['ibm.portal.Search Center'].urlGeneration.setPortlet('ibm.portal.Search Center Portlet Window')
- Change the values for navigation node and control holding:
- Change the value for navigation node to the unique name of
your custom Search Center page.
- Change the value for control holding to the unique name that
you gave the copy of your Search Center portlet.
After your updates, the code snippet might look like the
following:wp.navigationModel['ibm.portal.your_public_search_center_page_unique_name'].urlGeneration.setPortlet('ibm.portal.your_public_search_center_portlet_window_unique_name')
- Restart your portal server.
Results
When your portal users do a search by using the search box
in the theme, they are now directed to the Search Center on your public
portal page.