Drupal core themes the author name and published date in theme_preprocess_node() and makes it available as the $submitted variable. I think that Omega should follow this behavior and simply print the $submitted variable in node.tpl.php instead of ignoring it and re-theming the output.
Currently in Omega 3.1 node.tpl.php:
<?php if ($display_submitted): ?>
<footer class="submitted"><?php print $date; ?> -- <?php print $name; ?></footer>
<?php endif; ?>
It seem silly to have to override the node.tpl.php file just to update the author and publishing info formatting.
Can Omega not implement theme_preprocess_node() to implement any customization over core?
I can roll a patch if y'all think this is the right way of doing things.
Comments
Comment #1
star-szr+1 from me. Shouldn't be hardcoded in node.tpl.php.
Comment #2
jessehsHere's a patch. Please test. (I patched using patch -p1 command.)
Comment #3
star-szrFunny, I wrote almost the exact same code earlier in my subtheme, foo and all.
Lose the foo :)
I used this condition as well, because I wanted to hide the submitted date from my teasers.
Once the foo is gone this gets my recommendation.
Comment #4
marcoka commentedComment #5
jessehsHa ha! Whoops!
Here you go.
Comment #6
jessehsComment #7
datagroove_ commented+1
question though, the $date var is a string, how do we edit the strings format?
Comment #8
jessehs@datagroove_, I believe that the default $date variable is set by setting the Medium date format at the Date and time config page (path is /admin/config/regional/date-time in Drupal 7).
Comment #9
osopolarThis also affects the comment template (comment.tpl.php). Both should be done the same way.
Comment #10
kerasai commentedWow, please get this commited. Super simple issue but this is non-standard and it took me quite some time to unravel what was going on here.
Comment #11
steinmb commented