diff --git a/modules/node/node.module b/modules/node/node.module index 0c3cfb7..35d9ef5 100644 --- a/modules/node/node.module +++ b/modules/node/node.module @@ -1424,6 +1424,21 @@ function node_is_page($node) { } /** + * Process variables for page.tpl.php + * + * @see page.tpl.php + */ +function node_preprocess_page(&$variables) { + // Prevent the title from being printed in both the node and page template + // when a full node is being viewed. In order to have properly sectioned HTML5 + // markup for nodes, we must ensure the title is printed inside the node + // template, as opposed to the page.tpl.php template. + if (!empty($variables['node']) && $variables['page']) { + $variables['title'] = ''; + } +} + +/** * Process variables for node.tpl.php * * Most themes utilize their own copy of node.tpl.php. The default is located diff --git a/modules/node/node.tpl.php b/modules/node/node.tpl.php index 06dc199..e8e1f64 100644 --- a/modules/node/node.tpl.php +++ b/modules/node/node.tpl.php @@ -77,34 +77,37 @@ * @see template_preprocess_node() * @see template_process() */ -?> -
> - +// Hide the comments, links and the tags field so they can be rendered apart +// from $content afterwards. +hide($content['comments']); +hide($content['links']); +hide($content['field_tags']); + +// Use an

for the title for full node pages, otherwise use an

. +$heading_level = $page ? '1' : '2'; + +?> +
> - - >

+ + - -
- -
- -
> - +
- + + + -
+