Friday, October 03, 2008

Adding a "Fake" Item to the Views Dropdown

I recently built some demos using Bamboo Solution's fantastic "List Search Advanced" web part. I called it "Metadata Search" since that's what it really is - a search on any of the columns (but not documents in a library). We needed to have a search limited to individual lists but we couldn't use the out of the box Advanced Search web part because it needs a defined scope.  We have too many subsites (Microsoft recommends no more that 200 scopes, or something like that). We could have tried to roll our own, but Bamboo Solutions to the rescue! Highly recommended.

The primary use of the Bamboo search web part will be from a special search page that I will add to the site template. In looking for other ways to incorporate it, I came up with something interesting. I created a view called "search."  It didn't matter what was on the view because I hid it.

Then I edited the web part page and hid the view web part (in the Layout section). It is now a web part page which shows in the view drop down, and I can add web parts to it. I added the Bamboo Solutions search web part, but it could be anything. Instructions, maybe.

Do not remove the list view web part from the page. If you do, the page will no longer show in the drop down. You may then need to delete it with SharePoint Designer.

The users turned down my idea, but it's still a nifty (stupid) SharePoint trick that I'm sure I will use someday.

No comments:

Post a Comment