Can the search do this?

If you have questions about using mojoPortal, you can post them here.

You may want to first review our site administration documentation to see if your question is answered there.

This thread is closed to new posts. You must sign in to post in the forums.
9/9/2011 4:07:04 PM
Gravatar
Total Posts 5

Can the search do this?

Here is what I want to do.  I have a small site and don't really want or need any of the content to be searchable other then a blog control I have on one of the pages.

I would like to have the search box show up ONLY on that page, and search only the blog control on that page?  Is it possible?

I know how to add the search to layout master but how/can you add it to just one page?

I saw some posts about excluding certain controls from the search but can I just include one?

 

Thanks

9/9/2011 5:29:25 PM
Gravatar
Total Posts 2253

Re: Can the search do this?

Hi,

You can exclude all of the modules except the blog by adding the GUID for each one to the SearchableFeatureGuidsToExclude key in the user.config file. To find the GUID for each module, you'll have to use the Administration>Advanced Tools>Feature Installation page. There isn't a list of them anywhere on this site. I'll try to get a list posted in the next day or so, if Joe Audette doesn't have any objections to doing that.

As far as having the search box only show up on the blog, the easiest way is to place the search control in the layout.master and use CSS to hide or display the search control.

  1. Create the following CSS in your style.css file (you may want to search the file for the "searchpanel" class and change it).
    .searchpanel {display: none;}
    body.show-search .searchpanel,
    body.blogviewpost .searchpanel,
    body.blogviewarchive .searchpanel,
    body.blogviewcategory .searchpanel {display: block;}
  2. On the page you have the blog installed, add the "show-search" class to the "Custom Body Css Class" option.

By default this would hide the search box, and then it would be present on pages using the "show-search" css class in the body and any of the supporting blog pages.

HTH,
Joe D.

You must sign in to post in the forums. This thread is closed to new posts.