From 0d8515deb750fe2a02ee6f9f12860caceed7248f Mon Sep 17 00:00:00 2001 From: Angie Byron Date: Tue, 3 Nov 2009 06:47:23 +0000 Subject: #552478 by pwolanin, samj, dropcube, and sun: Improve link/header API and support on node/comment pages rel=canonical and rel=shortlink standards. --- modules/rdf/rdf.module | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'modules/rdf/rdf.module') diff --git a/modules/rdf/rdf.module b/modules/rdf/rdf.module index b520bfb96..7da53d86b 100644 --- a/modules/rdf/rdf.module +++ b/modules/rdf/rdf.module @@ -384,10 +384,17 @@ function rdf_preprocess_node(&$variables) { // In full node mode, the title is not displayed by node.tpl.php so it is // added in the head tag of the HTML page. if ($variables['page']) { - $title_attributes['property'] = empty($variables['node']->rdf_mapping['title']['predicates']) ? NULL : $variables['node']->rdf_mapping['title']['predicates']; - $title_attributes['content'] = $variables['node_title']; - $title_attributes['about'] = $variables['node_url']; - drupal_add_html_head(''); + $element = array( + '#tag' => 'meta', + '#attributes' => array( + 'content' => $variables['node_title'], + 'about' => $variables['node_url'], + ), + ); + if (!empty($variables['node']->rdf_mapping['title']['predicates'])) { + $element['#attributes']['property'] = $variables['node']->rdf_mapping['title']['predicates']; + } + drupal_add_html_head($element, 'rdf_node'); } // Adds RDFa markup for the date. -- cgit v1.2.3