I have customized the teaser view of my content types and the page view. Now I need to use the teaser view for the search results page. By default drupal displays a full text jumbled mess for each result, I need to be able to customize the look of each one per content type. I don't want to change HOW drupal gets the results just how it displays them.

Comments

nevets’s picture

Note you may need the display suite module for this.

Goto to the "Manage Display" tab for a content type.

Select the "Custom display settings" in the list of vertical tabs.

Select/check "search results"

Click "Save"

In the upper right will be the set of view modules you have enabled, "Default" will be the one current, click on "search results".

Order fields as needed.

Click "Save".

sokrplare’s picture

You have to use the Display Suite module right now because of a core bug (#1166114: Manage Displays Search Results doesn't manage the display of the search results). Alternatively, you can apply the patch for D7 in that issue - http://drupal.org/node/1166114#comment-4768026

pacome’s picture

Thanks for pointing the Display Suite module !

to save few minutes for the next ones : then you have to go in your search settings and select your new "search display"

-p-

jmdorian’s picture

I can't find where can I select "search display". There is no such parameter in search settings (admin/config/search/settings)

nevets’s picture

Once you install display suite the setting is per content type under the "Manage display" tab. See my post above.

jalves’s picture

Hey,

this works with custom search module?
I'm trying to apply as you said but the custom search is unaffected..

newpiter’s picture

There is the four steps to customize the result page in drupal 7
Step 1. Define a variable in a preprocess function in template.php file.
Step 2. Copy the search-result.tpl.php file from /modules/search directory to your current theme folder.
Step 3. echo the defined variable in the search-result.tpl.php file.
Step 4. Clear the template cache.