1


I use drupal 7 and I have custom content type named "Journal"
I want add Google Scholar meta tags to "Journal" nodes.
Like this:

<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">
<meta name="citation_volume" content="10">
<meta name="citation_issue" content="1">
<meta name="citation_firstpage" content="1">
<meta name="citation_lastpage" content="15">
<meta name="citation_doi" content="10.1074/jbc.M309524200">
<meta name="citation_pdf_url" content="http://www.publishername.org/10/1/1.pdf">
<meta name="citation_abstract_html_url" content="http://www.publishername.org/cgi/content/abstract/10/1/1">
<meta name="citation_fulltext_html_url" content="http://www.publishername.org/cgi/content/full/10/1/1">  
<meta name="dc.Contributor" content="Last Name1, First Name1">
<meta name="dc.Contributor" content="Last Name2, First Name2">
<meta name="dc.Title" content="Article Title">
<meta name="dc.Date" content="01/01/2007">
<meta name="citation_publisher" content="Publisher Name">
<meta name="robots" content="noarchive">

I tried the Metatag and Custom Meta modules. With the Metatag module, I can't add custom meta tags; with the Custom Meta module, I can't add custom meta tags to a content type.

How can I achieve this?

2 Answers 2

2

There is a module that allows adding Google Scholar meta tags: https://www.drupal.org/project/metatag_google_scholar . However, it is only available for Drupal 8.

I post this answer anyway, in case it might be useful (as an inspiration for a backport, for instance).

1

The Metatag module doesn't provide a UI for custom tags, but it does have an API for defining new tags. If you want to go down this route, look at the included Darwin Core sub-module for how it implements hook_metatag_info(). That should give you enough of a head start for the Google Scholar schema.

Once you have defined your custom hook_metatag_info() with all of the field you need, they will appear in the normal places where you can add Metatag information, and also be able to use the normal tokens as defaults, if desired.

I have used this technique for other formal taxonomy metadata (eg, Darwin Core).

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.