summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--modules/node/node.module17
-rw-r--r--modules/node/node.tpl.php40
2 files changed, 19 insertions, 38 deletions
diff --git a/modules/node/node.module b/modules/node/node.module
index 5dc3efe..0c3cfb7 100644
--- a/modules/node/node.module
+++ b/modules/node/node.module
@@ -1352,9 +1352,6 @@ function node_build_content($node, $view_mode = 'full', $langcode = NULL) {
$node = node_invoke($node, 'view', $view_mode, $langcode);
}
- // Make the view mode available in the node object.
- $node->view_mode = $view_mode;
-
// Build fields content.
// In case of a multiple view, node_view_multiple() already ran the
// 'prepare_view' step. An internal flag prevents the operation from running
@@ -1427,20 +1424,6 @@ function node_is_page($node) {
}
/**
- * Process variables for page.tpl.php
- *
- * @see page.tpl.php
- */
-function node_preprocess_page(&$variables) {
- // In order to have properly sectioned HTML5 markup for nodes, the title is
- // always printed inside node.tpl.php. This code prevents it from printing in
- // page.tpl.php as well.
- if (!empty($variables['node']->view_mode) && $variables['node']->view_mode == 'full' && node_is_page($variables['node'])) {
- $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 678e0a4..06dc199 100644
--- a/modules/node/node.tpl.php
+++ b/modules/node/node.tpl.php
@@ -77,36 +77,34 @@
* @see template_preprocess_node()
* @see template_process()
*/
-
-// Hide the comments and links so they can be rendered apart from $content
-// afterwards.
-hide($content['comments']);
-hide($content['links']);
?>
-<article id="node-<?php print $node->nid; ?>" class="<?php print $classes; ?>"<?php print $attributes; ?>>
+<div id="node-<?php print $node->nid; ?>" class="<?php print $classes; ?> clearfix"<?php print $attributes; ?>>
+
+ <?php print $user_picture; ?>
<?php print render($title_prefix); ?>
- <?php if ($display_submitted || $user_picture || $title): ?>
- <header>
- <?php print $user_picture; ?>
- <?php if ($page): ?>
- <h1<?php print $title_attributes; ?>><a href="<?php print $node_url; ?>"><?php print $title; ?></a></h1>
- <?php else: ?>
- <h2<?php print $title_attributes; ?>><a href="<?php print $node_url; ?>"><?php print $title; ?></a></h2>
- <?php endif; ?>
- <p class="submitted"><?php print $submitted; ?></p>
- </header>
+ <?php if (!$page): ?>
+ <h2<?php print $title_attributes; ?>><a href="<?php print $node_url; ?>"><?php print $title; ?></a></h2>
<?php endif; ?>
<?php print render($title_suffix); ?>
+ <?php if ($display_submitted): ?>
+ <div class="submitted">
+ <?php print $submitted; ?>
+ </div>
+ <?php endif; ?>
+
<div class="content"<?php print $content_attributes; ?>>
- <?php print render($content); ?>
+ <?php
+ // We hide the comments and links now so that we can render them later.
+ hide($content['comments']);
+ hide($content['links']);
+ print render($content);
+ ?>
</div>
- <?php if ($links = render($content['links'])): ?>
- <nav><?php print $links; ?></nav>
- <?php endif; ?>
+ <?php print render($content['links']); ?>
<?php print render($content['comments']); ?>
-</article>
+</div>