I'm not sure how much sense this would make if we provide integration with Views and Panels, since that's most of the use-cases that people wanted for the nodewords custom pages sub-module in Drupal 6. Leaving this as postponed for now.

Comments

Jamie Holly’s picture

I could actually see this being useful, as there are sites out there that have custom pages that aren't views or panels pages (ie: custom module pages). Of course another alternative (or perhaps one that should also be included) is an API to allow these modules to add their own metatags.

Dave Reid’s picture

I'm still not sold on this, since the 80% of users would be fine as long as entities, views, and panels all have meta tag support. There would be an API, but this would be much lower priority than the Views and Panel integration. Once we have the full base API ready, anyone can post a temporary stand-alone solution here though.

john.oltman’s picture

Issue tags: +D7, +Meta Tags by Path
Dave Reid’s picture

Issue tags: -D7, -Meta Tags by Path
ar-jan’s picture

Version: » 7.x-1.x-dev

Wait, this issue is a duplicate of itself... That's so meta! ;)

But, I just wanted to add another use case: assigning a noindex tag to comment, comment/reply paths (example). The problem that emerged in that thread is that the comments permalinks internally carry a node/% path, which also makes an ad hoc solution hard.

KoCo’s picture

And for generic Drupal pages, 'login page' or 'contact form' for example.
You have the general, but one would rather choose not to index login and alter description for certain contact pages.

(following)

ejwettstein’s picture

I have to agree with KoCo. I want to get my login and password recovery page out of Google. It's ugly to have them there. I'm not quite willing to change my global settings to no-index and make sure everything else is in.

ar-jan’s picture

Priority: Major » Normal
Status: Closed (duplicate) » Postponed

If you need a temporary fix for some paths, you can use something like this:

function metarobots_preprocess_html(&$var) {
  $url_components = explode('/', request_uri());
  if ($url_components[1] == 'comment') {
    $elements = array(
      '#tag' => 'meta',
      '#attributes' => array(
        'name' => 'robots',
        'content' => 'noindex,follow',
      ),
    );
   drupal_add_html_head($elements, 'robots');
  }
}
dynamicdan’s picture

Priority: Normal » Major
Status: Postponed » Needs work

Seems like a good tmp fix but this module could also implement that logic easily right?

showing /user in a google index is a (medium) security risk in my opinion.

I see 2 needs:

  1. existing/system paths for security
  2. the unknown... custom modules etc (perhaps same as above?)

1) can be resolved either with URL matching or perhaps module URL matching?
2) would work similar to 1?

Tip: re-use the interface that pathauto does. Display a list of custom URLs and their meta assigned.

Updating to 'major' due to security risk (and that everyone in drupal world would use this feature!!).

chrisroditis’s picture

Is there currently an api that allows us to achieve this, or any plans to implement this functionality into the module?

Pablo Romero’s picture

I agree with KoCo. I've also been trying to customize metatags for contact and login pages.

Subscribing

Summit’s picture

Hi, I know a different solution what works on custom paths. It is not metatag but a specific module.
It is called Beanstag: http://drupal.org/sandbox/beansboxchrispang/1189124
It is working great for custom pages!
Would love to see it integrated in metatag!
Greetings, Martijn

DamienMcKenna’s picture

DamienMcKenna’s picture

Status: Needs work » Active
Issue tags: +D7 stable release blocker

Would you be willing to use Context to assign the meta tags per path? There's already a context_metadata module which I'm intending to help with to rewrite to use the Metatag module's configuration rather than its own, I think it'd be a huge time savings if we go this route rather than building our own system.

Am tagging this as a release blocker as we need either a) working code, or b) a decision to use context_metadata.

Summit’s picture

Hi, I went allready that route, not yet completely there with tokens, but see: http://drupal.org/node/1765796#comment-6435626

greetings, Martijn

couturier’s picture

This could really be on to something, using Context to assign meta tags per path. I know that EclipseGc is working to incorporate Panels features into Drupal 8 core, and Panels works together with Context for URL creation, so this way of working is going to be getting more popular going forward.

The Views maintainers don't want to spend the time to support unique page titles for their paginated views that are creating SEO errors with Google and Bing (reference this issue). And, with page title support now also added to the Metatag module, maybe we could achieve not only metatag support but also page title support specific to URL through Context. If this is possible, it would save time and maybe also achieve this Metatag module request: Using Views with [current-page:page-number] to avoid duplicate page titles (comment #5 above also applies to this as a variation).

DamienMcKenna’s picture

Status: Active » Postponed

I'm personally pushing to focus on Context integration as the initial solution for per-path functionality: #1187710: Integrate with Context

DamienMcKenna’s picture

Status: Postponed » Closed (duplicate)

Thanks to amazing work by Marcin Pajdzik, we will be handling the by-path functionality via #1187710: Integrate with Context.

DamienMcKenna’s picture

Duplicate issues don't get tags.

Status: Postponed » Closed (duplicate)