Community & Support

Search gives post author / date attributes even when turned off in settings

Here's what I have installed, firstly:

Drupal 6.10
Ubercart 6.x-2.0-rc1
Token 6.x-1.11
UC Attribute Stock Filter 6.x-1.0-beta12
AD Novus 6.x-1.3 (theme)

So. I turned off Display Post Information under Home » Administer » Site building » Themes and this totally works for the regular catalog viewing. My troubles being when I use the Search box - the search engine calls up the Post Information when it pulls up Inventory, even though it's turned off in Themes. Search doesn't have a way (that I can see) to configure not displaying post info.
I'm thinking there must be a call in the /modules/search/search.module file but I don't SEE it - if someone can point me in the right direction I'd appreciate it.

Phil Comins

Comments

On one my sites I just hid it

On one my sites I just hid it by grabbing the class name with firebug and setting display: none;. I couldn't figure another solution that didn't involve modifying drupal core.

Edit the file search-result.tpl.php

Hi,

Hiding this info by display: none in CSS is certainly one way to do it - but this info will show up in the HTML source.

My own preference would be to modify the search-result.tpl.php file in the appropriate theme.

If your chosen theme doesn't have this file, copy it into the theme folder from /modules/search.

Remove/edit the lines:

  <?php if ($info) : ?>
  <p class="search-info"><?php print $info; ?></p>
  <?php endif; ?>

That should do the trick. For more information on Themes and template over-riding, see: http://drupal.org/theme-guide.

M

nobody click here