CornerPixel Blog RSS 2.0

# Tuesday, April 28, 2009

Today I was working on implementing search on a customers website I am doing in the DotNetNuke CMS.  At first I thought this would be automatic and mostly set up.  I instead found that I needed to adjust some thing, so I have put together a small blog entry to help other out who may be having similar issue setting up their blogs.

I have below the three biggest keys to search success on your DotNetNuke site and in your DNN skins.

First, Skinning to include Search

The first thing to do is to include the Register TagPrefix at the top of your .ascx skin file as shown below.

<%@ Register TagPrefix="dnn" TagName="SEARCH" Src="~/Admin/Skins/Search.ascx" %>

Second, Add the control to your skin.

Figure out where you want the search bar to be and place the following code inside your html markup.

<dnn:SEARCH runat="server" id="dnnSEARCH"  CssClass="dnn_search" UseDropDownList="true" Submit="<img src=&quot;images/search.png&quot; border=&quot;0&quot; alt=&quot;Search&quot; /&gt;" />

Attributes explained

  • CssClass  (is used in the CSS style sheet to style your search box)
  • UseDropDownList  (used if you want a dropdown web/site pick menu within the search box)
    • If you don’t want a drop down menu just don’t include this attribute
  • Submit  (is used to replace the words submit with an image)
  • ShowWeb (false or true)(used to hide web from search options)(default true)
  • ShowSite (false or true)(used to hide or show site from search options)(default true)

Third, Make sure the Search Results module is on the Search Results page.

This seems like a no brainer and it is usually set up for you.  If you are not getting any search results, go to your admin menu and select pages.  Once on your pages list go to the Search Results page and make sure to add the Search Result module just like you would any module to the content area you want the search results to display in.

That is about it.  It is not overly hard to add search to your skins in DotNetNuke.

Tuesday, April 28, 2009 9:57:38 PM (Pacific Standard Time, UTC-08:00)

#       Comments [1] - Trackback

CMS | DotNetNuke | Skinning

Sunday, June 21, 2009 11:38:59 PM (Pacific Standard Time, UTC-08:00)
Next step is to get cross portal search going. I will post more on that when I get it working well.

I am pretty sure I will need a non-core module to do it though. Kind of a bummer.
Michael Silva - MikePixel
Comments are closed.

Archive

<April 2009>
SunMonTueWedThuFriSat
2930311234
567891011
12131415161718
19202122232425
262728293012
3456789

Email Subscription

Sign up to get the CornerPixel Blog delivered to your email.

About the Author

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

Sign In

Statistics

Total Posts: 51
This Year: 2
This Month: 0
This Week: 0
Comments: 26