Hi.

I would like to change two things about the search and advanced search:

1. Remove the Users tab from search (I need all to be able to view profiles so changing that in Permissions is not an option).

2. Not have all content types show in Only of the type(s). I want to just search Page in the advanced search and not have other content types displayed in the advanced search (I don't mind a content of a certain type does come up in search - I just don't want people to see content types.

Thanks. Solutions to one or both are very welcomed!

Comments

vm’s picture

you won't find settings for this in the UI. you will have to theme your way to your desires. see: http://www.google.com/search?hl=en&q=drupal+theme+search+form&aq=f&oq=

for some tutorials out there.

waynedrupal’s picture

Thanks for the search link. I will have a look and see what I can come up with from the tutorials out there :)

sovarn’s picture

not wanting to dig an old topic up, but I also am trying to find a solution to this exact same question.

I can't find a way to theme the options out, if someone could point to me to the correct file that would be appreciated.

crutch’s picture

Advanced search should really be an administration tool, but the functionality should be there for regular site visitors so we can create custom search blocks for specific content types.

The problem is that if we turn off advanced search via permissions for users then trying to use a custom block to search a specific content type fails.

Also, the search theme template has simple and advanced search lumped into one php snippet so we are unable to correctly hide it without editing the search module.

vm’s picture

can also investigate views.module with exposed filters. If an exposed filter was node: type then you can sort by content type.

hawkdrupal’s picture

Advanced Search is not only not "advanced", it reveals way too much about the architecture of the site -- showing all the taxonomies, all the content types, allowing searching on Users, etc.

Drupal is presented as a content management system, but it is weakest at the details of content management (witness the unresolved discussions about teasers vs. body, unlocked vs. locked content, etc).

The solution is ugly:

1. Don't use the Search link in a menu. This prevents users from going directly to the form that allows Advanced Search. But once they do a search, they'll end up on a page that shows it.

So...

2. Hack the Search form of Drupal to either remove Advanced Search, or add a div or similar that can be used to control visibility.

But really, all of this and more should be configurable.