I was wondering if it would be relatively easy to pull the first 100 characters or so in the body of a page to display in the description meta tag?

Comments

mediafrenzy’s picture

I would be VERY interested in this also! Something I've been meaning to look into for ages.

toma’s picture

I add this code to my page-xx-tpl.php

<meta name="Description" content="About : <?php print $head_title ?>" />

In every page, i pick the page title to the description page, its not the best solution, but it works fine...
Free Webmaster Directory
http://www.dwebmaster.com

Marc Bijl’s picture

Try nodewords module, which makes it possible to add several meta tags (abstract, copyright, description, keywords) either manually, or semi automatically. I used it for 4.6.6 websites; it's pretty cool and good for SEO. AFAIK, there's no 4.7 version yet, but may be 4.6 or cvs can do the trick...

- http://drupal.org/project/nodewords
- http://drupal.org/node/9058/release

___________________
discover new oceans
lose sight of the shore

mediafrenzy’s picture

Interesting...

I'd prefer to use something other than dynamically adding the title as the description, but that might do as a backup plan...

As far as the nodewords goes, I'll have to look into how the semi-automatic stuff works. My users are confused enough as it is with how drupal sites work (without heavy customization), without forcing them to write a meta description as well!

Ideally I'd like it to be invisible, simply using the first 200 characters of their post as the description tag (for example).

netbjarne’s picture

I just tried the nodeworks cvs on a 4.7 installation, but got the following:

Fatal error: Call to undefined function: form_textfield() in /hsphere/local/home/oldrup/oldrup.eu/modules/nodewords.module on line 103

Besides that, the nodeworks looks like a neat module.

dlr’s picture

a lot in 4.7 module, thats why you get such messages.
Regards

Marc Bijl’s picture

To me it's not very clear whether the maintainer wants to continue this module or not (posted a topic and contacted by e-mail, but haven't received any response yet), however, there's an interesting discussion going on here - including patches to get nodewords module working for 4.7:

- http://drupal.org/node/39425

___________________
discover new oceans
lose sight of the shore

Robrecht Jacques’s picture

The author (me) is back and has fixed the CVS version to work in 4.7. Will release a 4.7 version of the module by the end of the week (need to do some more testing).

The "description" will be set automatically to the 255 first characters of the node teaser (excluding any markup) if you choose the "Use teaser" option on the settings page AND when you don't enter a "Meta Tag Description" manually.
You can even choose to not show the "Meta Tag Description" edit-textarea if you think it will confuse your users.

Marc Bijl’s picture

Tried cvs version and seems to do a terrific job so far!

With compliments,
Marc

___________________
discover new oceans
lose sight of the shore

ardee-1’s picture

Can nodewords put the description meta-tag on non-node html pages, such as pages with taxonomy-related lists (e.g., www.example.com/taxonomy/term/24)? I've entered a description into term 24's screen but that description doesn't show up in the header -- even though I've set nodewords to show put that meta-tag into headers. (Drupal 4.7.)

Thanks.

ardee-1’s picture

D'oh! The problem was that I was entering the description into the "standard" (Drupal-provided) Description field for the Term, not into the additional "Description" field provided by Nodewords.

Here's a thought: Could Nodewords use the text entered into the "standard" Description field for the Term rather than adding its own (somewhat redundant) Description field?

racakg’s picture

nodewords cvs work with my drupal 4.7. First, activate module in the admin page and then add sql tables manualy.

Cheers

Marc Bijl’s picture

See this post:
- http://drupal.org/node/63351#comment-99924

Note:
It will take some time (about a day I guess) before it will be visible and can be downloaded.

___________________
discover new oceans
lose sight of the shore