Active
Project:
Performance hacks
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
16 May 2012 at 19:33 UTC
Updated:
24 May 2012 at 03:47 UTC
By going around Drupals node_page_view we also skip generation of canonical and short link tags.
$uri = entity_uri('node', $node);
// Set the node path as the canonical URL to prevent duplicate content.
drupal_add_html_head_link(array('rel' => 'canonical', 'href' => url($uri['path'], $uri['options'])), TRUE);
// Set the non-aliased path as a default shortlink.
drupal_add_html_head_link(array('rel' => 'shortlink', 'href' => url($uri['path'], array_merge($uri['options'], array('alias' => TRUE)))), TRUE);
I wonder if this was intentionally left out for performance or could be added into this module in performance_hacks_node_show perhaps.
Comments
Comment #1
catchThere's no particular reason this was left out, most likely that support was added after I forked node_page_view().