The parent dependency meta tags module (a.k.a nodewords) supports the robots meta tag. It would be nice to add support for the robots meta tag by node type also.

One use case would be to disallow indexing for feed type nodes that are pulled onto the site via RSS. Usually these contain content that is not unique to the site, are only kept temporarily and should not be indexed.

CommentFileSizeAuthor
#2 nodewords_nodetype-robots.patch1.76 KBjohn bickar

Comments

john bickar’s picture

Subscribing.

I'll take a look at this module and see if I can offer a patch.

john bickar’s picture

Status: Active » Needs review
StatusFileSize
new1.76 KB

Patch attached which shamelessly lifts code from the nodewords and nodewords_nodetype modules :)

hanoii’s picture

Status: Needs review » Fixed

A bit late, but committed and thanks.

avpaderno’s picture

Status: Fixed » Needs work

The patch uses a private function of Meta tags, which is not necessary kept between an official version and the successive.

hanoii’s picture

Title: Add support for robots meta tag » Add support for robots meta tag - Using private function of Meta tags
hanoii’s picture

Status: Needs work » Fixed

It's not the patch itself that's using the private but rather the module. Patch is fine.

Private function issue @ #483286: The code uses a private Meta tags function

avpaderno’s picture

Status: Fixed » Active

The patch code calls _nodewords_check_content() in the following code lines:

+        if ( ( $robots = variable_get('nodewords_nodetype_robots_'. $node->type, '') ) !== '' ) {
+          $tags['robots'] = _nodewords_check_content(token_replace($robots, 'node', $node));
+        }
avpaderno’s picture

Status: Active » Needs work
hanoii’s picture

Status: Needs work » Fixed

I know, but it just copies what I do on other lines of the code. I am accepting the patch because although the private function is there, it's as well on the original module. It makes no sense continuing the discussion here while we are talking about it in the other issue. And besides, the patch was already committed and released on the new version of the module.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.