Project:Meta tags quick
Version:7.x-2.x-dev
Component:User interface
Category:support request
Priority:normal
Assigned:Unassigned
Status:fixed

Issue Summary

Hi all,

I am trying to add words for Meta Title, Meta keywords and Meta Description but I can only see fields for 'keywords' and 'Description'. Am I missing a Meta Title field?

Thanks

Comments

#1

Status:active» closed (works as designed)

Title is not a meta tag. If you want to manage it, please use http://drupal.org/project/page_title module

#2

OK, thank you.

#3

As a workaround, you can add a new field (field_meta_page_title)

Meta title field

And add this code to your template.php file:

<?php

function THEME_NAME_preprocess_html(&$head_elements) {
 
$elements = drupal_add_html_head();
  if (!empty(
$elements['metatags_quick_meta_page_title']['#attributes']['content'])) {
   
$head_elements['head_title'] = $elements['metatags_quick_meta_page_title']['#attributes']['content'];
  }
}
?>

#4

Version:7.x-1.7» 7.x-2.x-dev
Status:closed (works as designed)» active

While the title isn't a meta tag, it's quite possible to create a meta title tag. There's generally much confusion of the two, som SEO people talking about 'meta title' when they in fact mean the title tag, and no-one seems to be able to prove any advantages to using meta title.

However, it can be put to good use nevertheless. Attached patch defines the title meta tag, and provides a new formatter for meta tags that sets the page title. Apart from allowing those wanting the title meta tag to use it, it can be used to make meta title act as an override for the title. This means moving in on page_title territory, but metatags_quick have the advantage of also working on non-node pages. It also makes sense as meta tags is the focus of SEO folks, and the other big SEO thing is ensuring the proper title, which isn't always best title for the node.

Also worth noting that it seems that the metatag module supports a 'meta title' element by setting the page title.

AttachmentSize
metatags_quick-meta_title-1160402-4.patch 1.97 KB

#5

I've tryed instruction in #3, but I notice that the drupal_add_html_head() returns me metatags_quick values only in not-node pages.
Is it normal?

#6

#3 worked fine for me on path-based pages

#7

Status:active» needs review

The patch from comment #4 above works great, except that it also changes the h1 title printed on the page. I'm looking for a solution that allows me to have a completely different title in the <title> tag and also allows me to override the default pattern (ie. including the "| sitename" part).

The attached patch builds upon the one from comment #4. Basically when the display formatter is set to "default metatags_quick formatter" and the meta tag field is the title, it sets the "title" tag in addition to the meta tag of type "title". This allows me to have a different page title from the one in the h1 tag, and also allows me to remove the "| sitename" or change it in whatever way I wish.

AttachmentSize
1160402-7-page_title.patch 2.53 KB

#8

#7: thanks for a great amount of work. While the patch looks ok from the first sight, I would like to hear some responses if we need such a functionality inside metatags_quick (and not page_title, for example)

#9

@valthebald I guess one of the real benefits of this module over page_title is the ability to specify it for non-node pages, such as Views and Panels, that's why I did i this way.

#10

Status:needs review» fixed

@stella: sounds like a valid use case, I never considered that
Committed to 2.x-dev, thank you!