• Share
    • Twitter
    • LinkedIn
    • Facebook
    • Email
  • Feedback
  • Improve this Doc
Show / Hide Table of Contents

Search Theme Object Introduction

DNN Version: 09.02.00
10/02/2024 • 5 minutes to read
Contributors  Timo-Breumelhof
10/02/2024  • 5 minutes to read  • Contributors  Timo-Breumelhof

Displays the search input box and a quick results dropdown

Current Version: 01.00.00

Note

As the web search option does not work any more, the ShowWeb and ShowSite options are useless?

Include in Theme

ASCX

<%@ Register TagPrefix="dnn" TagName="SEARCH" Src="~/Admin/Skins/Search.ascx" %>  
<dnn:Search runat="server" id="dnnSearch" />

HTML Token

[SEARCH]

HTML Object Token

<object id="dnnSEARCH" codetype="dotnetnuke/server" codebase="SEARCH"></object>
Attribute Description Default Posssible Values DNN Version
CssClass Sets the CSS class for the option buttons and
search button. If you are using the DropDownList
option then you can style the search elements
without requiring a custom CssClass.
CSS class string 01.00.00
ShowSite Sets the visibility of the radio button
corresponding to site based search. Set to false to
hide the "Site" radio button. This setting has no
effect if UseDropDownList is true.
True / False 01.00.00
ShowWeb Sets the visibility of the radio button
corresponding to web based searchs. Set to false
to hide the "Web" radio button. This setting has
no effect if UseDropDownList is true.
True / False 01.00.00
SiteIconURL Sets the site icon URL. If SiteIconURL is not set or
empty then this will return a site relative URL for
the dotnetnuke-icon.gif image in the
images/search subfolder. SiteIconURL supports
using app relative virtual paths designated by the
use of the tilde (~).
String 01.00.00
SiteText Gets or sets the text for the "site" radio button or
option list item. If the value is not set or is an
empty string, then the localized value from
/admin/skins/app_localresources/Search.ascx.resx
localresource file is used.
String 01.00.00
SiteToolTip Sets the tooltip text for the "site" radio button. If
the value is not set or is an empty string, then the
localized value from
/admin/skins/app_localresources/Search.ascx.resx
localresource file is used.
String 01.00.00
SiteUrl Gets or sets the URL for doing web based site
searches. If the value is not set or is an empty
string, then the localized value from
/admin/skins/app_localresources/Search.ascx.resx
localresource file is used. The site URL is a
template for an external search engine, which by
default, uses Google.com. SiteURL should include
the tokens [TEXT] and [DOMAIN] to be replaced
automatically by the search text and the current
site domain.
String 01.00.00
Submit Sets the html for the submit button. If the value is
not set or is an empty string, then the localized
value from
/admin/skins/app_localresources/Search.ascx.resx
localresource file is used. If you set the value to
an hmtl img tag, then the src attribute will be
made relative to the current skinpath.
String 01.00.00
UseWebForSite Sets a value indicating whether to use the web
search engine for site searches. Set this value to
true to perform a domain limited search using the
search engine defined by SiteURL.
True / False 01.00.00
UseDropDownList Sets a value indicating whether to display the
site/web options using a drop down list. If true,
then the site and web options are displayed in a
drop down list. If the drop down list is used, then
the ShowWeb and ShowSite properties are not
used.
True / False 01.00.00
WebIconURL Sets the web icon URL. If the WebIconURL is not
set or is an empty string then this will return a site
relative URL for the google-icon.gif image in the
images/search subfolder. WebIconURL supports
using app relative virtual paths designated by the
use of the tilde (~).
String 01.00.00
WebText Sets the text for the "web" radio button or option
list item.If the value is not set or is an empty
string, then the localized value from
/admin/skins/app_localresources/Search.ascx.resx
localresource file is used.
String 01.00.00
WebToolTip Sets the tooltip text for the "web" radio button. If
the value is not set or is an empty string, then the
localized value from
/admin/skins/app_localresources/Search.ascx.resx
localresource file is used.
String 01.00.00
WebURL Gets or sets the URL for doing web based searches.
If the value is not set or is an empty string, then
the localized value from
/admin/skins/app_localresources/Search.ascx.resx
localresource file is used. The web URL is a
template for an external search engine, which by
default, uses Google.com. The WebURL should
include the token [TEXT] to be replaced
automatically by the search text. The [DOMAIN]
token, if present, will be replaced by an empty
string.
String 01.00.00

Examples:

Default

<dnn:Search runat="server" id="dnnSearch" />

UseDropDownList = True

<dnn:Search runat="server" UseDropDownList ="True" id="dnnSearch" />

ShowSite = False, ShowWeb = False

As ShowWeb does not work any more, this should be the default option

<dnn:Search runat="server" ShowSite="False" ShowWeb="False" id="dnnSearch" />

Custom Submit text

FYI, It's better to get this text from a RESX file

<dnn:Search runat="server" Submit="Show me some Results!" ShowSite="False" ShowWeb="False"  id="dnnSearch" />
Theme ObjectsAbout ThemesCreating Themes
Back to top by the community, for the community... #DNNCMS