Révision 7e72b748
Ajouté par Assos Assos il y a plus de 6 ans
drupal7/sites/all/modules/ctools/page_manager/plugins/tasks/node_view.inc | ||
---|---|---|
85 | 85 |
ctools_include('context'); |
86 | 86 |
ctools_include('context-task-handler'); |
87 | 87 |
|
88 |
$uri = entity_uri('node', $node); |
|
89 |
if (isset($uri['path'])) { |
|
90 |
// Set the node path as the canonical URL to prevent duplicate content. |
|
91 |
$meta_canon = array( |
|
92 |
'rel' => 'canonical', |
|
93 |
'href' => url($uri['path'], $uri['options']), |
|
94 |
); |
|
95 |
drupal_add_html_head_link($meta_canon, TRUE); |
|
96 |
|
|
97 |
// Set the non-aliased path as a default shortlink. |
|
98 |
$meta_short = array( |
|
99 |
'rel' => 'shortlink', |
|
100 |
'href' => url($uri['path'], array_merge($uri['options'], array('alias' => TRUE))) |
|
101 |
); |
|
102 |
drupal_add_html_head_link($meta_short, TRUE); |
|
103 |
} |
|
104 |
|
|
88 | 105 |
// Load all contexts. |
89 | 106 |
$contexts = ctools_context_handler_get_task_contexts($task, '', array($node)); |
90 | 107 |
|
Formats disponibles : Unified diff
Weekly update of contrib modules