MOSS Forum

Ask Question   UnAnswered
Home » Forum » MOSS       RSS Feeds

How to modify the existing controls like Advance Search

  Asked By: Daniel    Date: Jan 23    Category: MOSS    Views: 1323

I am trying to modify some of the existing controls that is rendered
with the MOSS like 'Advanced Search' Controls. To make use of some of
the webparts with some added functionalities we can inherit that
WebPart class and can add our logic to enhance their functionalities(If
the WebPart class is not Sealed). So please let me know if it is
possible to add some custom look and feel to the Out of box controls
like 'Advanced Search'. I need almost same fuctionality that
of 'Advanced Search' with some enhanced look and feel and instead of
the dropdown we need Check Boxes.



2 Answers Found

Answer #1    Answered By: Lynn Mann     Answered On: Jan 23

Note that the standard search  control already provides quite a number
of properties than can be used to vary the behavior (search scope
dropdown contents, whether to show advanced  search, etc.) Many times
it's sufficient to just provide a delegate control definition that
includes the properties you want.

If you can't get what you want through the standard properties, it is
possible to extend and customize the standard search controls, but you
need to understand how to manage delegate controls. We did so to
change the table layout markup to something more amenable to CSS
layout, as follows:

- define a class  extending
Microsoft.SharePoint.Portal.WebControls.SearchBoxEx (note it's a web
control, not a full webpart)

- hack as desired. as usual with most SP implementations, not all
the interesting child control references or helper methods are
accessible from a subclass. We found it easiest to traverse the child
control tree once it had been built, pulling out and rewiring the
pieces we needed.

- create a feature (at whatever scope desired) with a new delegate
control definition for "SmallSearchInputBox" that uses your custom
class. You'll need to use a sequence number lower than 50 to override
the moss  version. Ours looked something like

<Control Id="SmallSearchInputBox"
ControlAssembly="SRA.SharePoint.Portal, Version=,
Culture=neutral, PublicKeyToken=04600c0c12595ab1">
<Property Name="CssClass">ms-searchbox</Property>
<Property Name="RegisterStyles">false</Property>
// ... etc.

- package up your code and the feature def in a solution.

Hope this makes sense, particularly the feature stuff.

Answer #2    Answered By: Damini Dande     Answered On: Jan 23

Can you please point me out to some resources or documentation which has
the step by step explanation of what you said or what I need to do (if
any)? If you have any such resources then please share those with me.

Didn't find what you were looking for? Find more on How to modify the existing controls like Advance Search Or get search suggestion and latest updates.