Active
Project:
Submitted By
Version:
7.x-1.0
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
30 Nov 2017 at 13:49 UTC
Updated:
30 Nov 2017 at 13:49 UTC
Jump to comment: Most recent
variable $display_submitted is unavailble at node.tpl.php and avoiding exibition control from the theme.
despite this the variable $display_submitted is available at template.php and arriving empty on node.tpl.php.
To make work, I did:
# template.php
<?php
function novoportal_preprocess_node(&$variables) {
$variables['display_submitted_by'] = $variables['display_submitted'];
}
?>
Just copy $variables['display_submitted']; to preserve it from something that cleans up.
# templates/note.tpl.php
<?php
hide($content['comments']);
hide($content['links']);
hide($content['submitted_by']);
print render($content);
?>
[...]
<?php if ($display_submitted_by): ?>
<?php print render($content['submitted_by']); ?>
<?php endif; ?>
[...]
$display_submitted is unavailable here!
Comments