DNN 4.5.2 has marvelous new search options - Web and Site. In our German forums, there have been already the first questions, how to modify it. As Search is a Skin Object (SKO), modification can be done in the skin of your site using attributes, that are either placed in the skin.xml file of an HTML skin or apended to the the dnn:Search tag inside the .ascx file of the compiled skin. Note, that html skins need to be packaged and uploaded or reparsed, for modifications to take effect. For details please refer to the Skiing Guide, available on the documentation page.
The Search SKO has 3 new attributes:
Attribute |
Values |
Default |
Description |
• ShowSite |
True, False |
True |
display/hide option "Site" to perform a search of the current site (DNN portal) |
• ShowWeb |
True, False |
True |
display/hide option "Web" to perform a search of the WWW using the search site, as set up in Site Settings (Google, Yahoo, MSN) |
• UseWebForSite |
True, False |
False |
use the WWW search Site, as set up in Site Settings, to perform searches of the current site (DNN portal). Note: this uses the search index stored at the the search site; any non-public content will not be included! |
If you want to use Search SKO for site search only, set both options ShowSite and ShowWeb to false, otherwise a single option button Site will be displayed.
If you want to use Search SKO for web search only, set ShowSite to False and ShowWeb to True, this will show a single option button Web in front of search, that can only be hidden by modifying /admin/skins/search.ascx line 2, adding style:"display:none" before the slash near the end of the line - be aware, that this will affect all uses of the Search SKO on all portals of your installation.