Closed (works as designed)
Project:
Zen
Version:
6.x-2.0
Component:
CSS/HTML Markup
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
13 Jul 2010 at 08:47 UTC
Updated:
13 Feb 2011 at 19:07 UTC
In zen/templates/node.tpl.php the node submitted info is hardcoded:
<?php if ($display_submitted): ?>
<span class="submitted">
<?php
print t('Submitted by !username on !datetime',
array('!username' => $name, '!datetime' => $date));
?>
</span>
<?php endif; ?>
That makes it impossible to control the rendering with the theme_node_submitted() function.
To solve the problem you just have to change the peace of code to:
<?php if ($display_submitted): ?>
<span class="submitted">
<?php print $submitted ?>
</span>
<?php endif; ?>
Comments
Comment #1
vegantriathleteWhile it's true that you can't change the hard-coded text, in the comments at the top of node.tpl.php it says
Additionally, later in the comments it says
So, I'm guessing that this is a design choice and will not be addressed.
Comment #2
jix_ commentedComment #3
Jonah Ellison commentedReopening -- I implemented theme_node_submitted() on my Zen subtheme and became rather frustrated when my node pages did not show my change.
While it looks like $submitted is deprecated in Drupal 7, the Drupal 6 theme should work with Drupal 6. (We'll all have to rewrite our themes to port it over to D7 anyway.) I agree with the the original poster -- change it to
$submittedComment #4
johnalbinIf you are comfortable with implementing theme_node_submitted in your sub-theme, you should be comfortable overriding node.tpl.php in your sub-theme to put the soon-to-be-deprecated variable back in.
Comment #5
Jonah Ellison commentedThe argument was for the Drupal 6 Zen theme to be compatible with Drupal 6 API. I am sad to see it not complying.
Comment #6
ahimsauziThis line in D7 theme_preprocess_node:
if (variable_get('node_submitted_'seems to be the issue. There no such variable in D7 API (unless I missed it somehow).After implementing the overwrite to node.tpl, as suggested above, the error is gone.