I'm using CCK, but to modify the display I'm not using contemplate module
(but instead I created some files in the theme directory). Can I
influence somehow what teaser does Meta_tags assign to the
meta description tag? Thanks in advance.

Comments

dww’s picture

Title: CCK without contemplate » Mapping CCK field to meta description
Version: 4.7.x-1.2 » 5.x-1.x-dev
Component: Miscellaneous » Code
Category: support » feature

Whoops, this is an even older request... Re-posting (and providing a more clear title):

Yes, this would be excellent. I'd use this functionality if it existed. I've got a custom CCK field for the teaser for my nodes. Currently, I'm just manually setting the description meta tag, which works fine. But, it'd be great if this module could do that for you. I'll probably be rolling this module out on the site for the keywords meta tag, so it'd be nice if it could properly handle a specific CCK field for the description field for each content type.

It should probably form alter the content type forms to add a new "Meta tags" fieldset when editing each node type. In there, you could have a drop-down of all the fields in that node type to select which field to use for the description, with a default value of "body teaser" or something to indicate you want the default core teaser. Not sure if it'd make sense to have a similar field selector for any of the other meta tags. I guess we'd have to have a new DB table that mapped node types to the field to use for the description, unless we wanted to just store that in {variable}.

@Robrecht/Gabor:
- Is this all too complicated to make it worth while for metatags to support natively?
- Would you be in favor of such a change if I supplied code for it?
- If so, would you prefer variable_(set|get) or a separate DB table?

I'm basically happy with my custom code to handle this myself, but if there was support from the maintainers of this module to add a way to do this "natively", I'd consider cranking out a patch. But, I won't spend the time if it's doomed for "won't fix". ;)

Thanks,
-Derek

p.s. #227053: Mapping CCK field to meta description marked duplicate of this.

alexkessler’s picture

subscribing

iantresman’s picture

This would be very useful. For example, Google scholar is helped by the addition of meta tags, which could be derived from various CCK fields such as the following:

<meta name="citation_journal_title" content="Journal Name">
<meta name="citation_authors" content="Last Name1, First Name1; Last Name2, First Name2">
<meta name="citation_title" content="Article Title">
<meta name="citation_date" content="01/01/2007">
etc

I'm sure there are many other similar uses.

randomuser’s picture

+1

smacphail’s picture

Subscribing

I'd also would like to see this feature, although pretty sure my admins can work around this for now. (cut 'n paste)

avpaderno’s picture

Status: Active » Closed (won't fix)

As the Drupal 5 version is not supported anymore, I am changing the status of this report.

rimu’s picture

Version: 5.x-1.x-dev » 6.x-1.x-dev
Status: Closed (won't fix) » Active

I'm reopening the request for the 6.x branch rather than 5.x

avpaderno’s picture

Version: 6.x-1.x-dev » 5.x-1.x-dev
Status: Active » Closed (won't fix)

For the Drupal 6 branch, there is already #508496: Support for tokens, and #526934: Allow users to define custom meta tags.

I am resetting the metadata associated with this report.