Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
3629b1fd
Commit
3629b1fd
authored
Oct 29, 2011
by
Nathaniel Catchpole
Browse files
Issue
#1077602
: roll back.
parent
dbbdfee9
Changes
2
Hide whitespace changes
Inline
Side-by-side
modules/node/node.module
View file @
3629b1fd
...
...
@@ -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
...
...
@@ -1426,20 +1423,6 @@ function node_is_page($node) {
return
(
!
empty
(
$page_node
)
?
$page_node
->
nid
==
$node
->
nid
:
FALSE
);
}
/**
* 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
*
...
...
modules/node/node.tpl.php
View file @
3629b1fd
...
...
@@ -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
>
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment