Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By jarobinson1c on
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
Note you may need the display
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".
Core search results bug
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
Thanks for pointing the
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-
I can't find where can I
I can't find where can I select "search display". There is no such parameter in search settings (admin/config/search/settings)
Once you install display
Once you install display suite the setting is per content type under the "Manage display" tab. See my post above.
custom search module
Hey,
this works with custom search module?
I'm trying to apply as you said but the custom search is unaffected..
There is the four steps to
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.