By tdellaringa on
Hello, not sure why this is happening but my story nodes have no class attached, and because of this I cannot style how I want my stories to look. Here is what I see in my source:
<div class="" id="node-17">
(rest of story code here) etc.
Looks like this section is controlled in this part of my template of node.tpl.php - first line
<div class="<?php print $node_classes ?><?php if ($sticky) { print ' sticky'; } ?>" id="node-<?php print $node->nid; ?>">
Seems at the very least, $node_classes is undefined or has no value. I could hard code a value here, but that isn't really how this is intended to work nor how I want to solve this. Is this an administration setting somewhere, or do I possibly have an error?
Thanks
Tom
Comments
$node_classes is not a standard phptemplate variable
$node_classes is not a standard phptemplate variable so it is unclear where it would have been set. The default node.tpl.php uses this to set class for example
So the node always has class 'node', the class 'sticky' if the sticky flag is set and 'node-unpublished' if the node is not published.
Ok, then this is an error in
Ok, then this is an error in the theme by the theme creator I am using then - I'm using Aberdeen. I replaced it with what you posted and it now works. Thanks!
Tom
Thanks ! I'm using Aberdeen
Thanks ! I'm using Aberdeen too ! This solved my problem, thanks again !
--
I'm from Hong Kong. My profile shows Thailand because Hong Kong was not available from the country list.