views:

27

answers:

2

Hi,

Is there any way to write in the Drupal back-end the text to display in the search engine summaries?

Currently, the beginning of my home page (usually menus...) is displayed. I would like to add a description instead.

Thanks

A: 

You can't do this in the backend.

You should be able to this with regular Drupal theming. How depends on which search tool you use.

googletorp
google. Should I add a small description at the beginning of my page and hide it with css ?
Patrick
I would do it from within Drupal, probably either a template file or in a preprocess hook, and add the extra info when the criteria match.
googletorp
uhm, how "preprocess hook" would be useful ? I mean.. isn't easy just add the description at the beginning of the template and hide it ? oh.. you probably mean to remove the html from the page and leave it just for google ? But how can I distinguish google from a normal visitor ?
Patrick
You haven't been clear on when you want to show and hide it. But the logic to determine that can be run in a preprocess hook or in the template file. then you can print the markup when you want to show it, and not print it when you do don't want to show it.
googletorp
ok, so basically my idea is to add the html code at the top of the page with the website description for google and hide it with css for normal users
Patrick
+1  A: 

Google uses the metatag "description" when is it is available, instead of the content on the page.

There are a few modules that will help you create them:

nodewords and Integrated Metatags

Are the most popular. Using one of these modules will most likely be easier than hiding text with css, and from what I understand google ignores hidden text at least part of the time.

you can see this in action at our site

www.industrytrader.com

Here is a google search showing the how the custom descriptions show up.

mirzu

related questions