Closed (fixed)
Project:
Advanced Theme Construction Kit (ATCK)
Version:
6.x-4.0
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
20 Jan 2009 at 04:49 UTC
Updated:
17 Feb 2009 at 05:10 UTC
Unless I'm missing something (which is very possible, if not likely), ATCK 4.0 seems to be missing node-type definitions - the node ID is defined but the class is a null string.
This is with commenting out line 71 in template.php to retain system.css.
Marking this as critical, because, well... it makes advanced theming impossible - yikes!
This is my first foray into D6 and perhaps things are done differently, but Garland at least defines the node as "node." Missing the old ntype-page, ntype-story, etc. - could something else be affecting this? Thanks for any ideas - and for a great theme framework!
Comments
Comment #1
calebgilbert commentedWill check up on this bcobin - I've got some fairly substantial additions to atck for Drupal 6 coming in the next few weeks, so depending on what I find here I'll add this to the mix.
Comment #2
bcobin commentedThanks, Caleb... (you can call me 'Billy" BTW..) - in the meantime, I'm wrapping page and story content in "ntype" divs to get around it. If you figure out something in the meantime, please just drop a line over here, I guess...
Keep up the great work - looking forward!
Comment #3
bcobin commentedThis is actually quite a bit more serious than it seems at first glance - without the node class definitions, "sticky" and "front page" can't be styled separately (I seldom use these.) Folks will be tearing their hair out.
I've been clumsily poking around and I'd say it's a theme preprocess issue, and I'd also look at the print class script in node.tpl.php - if I knew what I was doing, I'd fix it myself, but I've had no success so far ;-(
I would certainly classify this as a "Beta" right now at the very least with an advisory - especially considering that you need to comment out the unset system.css command to have it work with js in D6.
Keep on pluggin', Caleb - we ATCK fans anxiously await! Thanks...
Comment #4
bcobin commentedAh... I think I see what's happening...
You're outputting your $body_attributes before the container in the page template and the node template class definition isn't doing anything - it's just a null string. So page or story styling could override the styling in other regions, which I don't think you'd want to do.
Then again, I don't really know what I'm doing, so you might have had something else in mind.
In any event, for now I've emulated the 5.x ATCK behavior by declaring the $body_attributes immediately after the $content conditional, like this:
<?php if ($content): ?><div <?php print $body_attributes; ?>><?php print $content; ?> </div>which seems to do the trick in returning the proper node class definitions in the right place, but still doesn't feel quite right.
I will soldier on for now and look forward to ATCK 5.0 - good luck on all your stuff!
Comment #5
calebgilbert commentedHi Billy - just an update to let you and others know that an update to the ATCK 6x branch is indeed still on schedule to be pushed out soon. I should have time to work on this this week and the week coming.
Comment #6
calebgilbert commentedHi Billy - I have some other stuff I want to get in before rolling a new version but this can get your node type definitions (sticky, node-type, etc) going for you in ATCK 6.x.
In your node.tpl.php replace the top line with this:
<div id="node-<?php echo $node->type .'-'. $node->nid; ?>" class="<?php print $node_class ?>">...and in template.php replace the existing atck_preprocess_node() with this:
Comment #7
calebgilbert commentedAlso, to make the $body_attributes clean you can do this: (again this will be committed soon)
1) In template.php, in order to leave the body class editable change the line:
$vars['body_attributes'] = $body_id.' class="'.implode(' ', $body_class).'"';to
$vars['body_attributes'] = $body_id.' class="'.implode(' ', $body_class);2) In page.tpl.php file make the body tag look like this:
<body <?php print $body_attributes; ?> center">3) Delete the, now unnecessary and redundant,
<div <?php print $body_attributes; ?>>which occurs directly below the body tag, as well as the closing tag for this div (which is located just before the closing body tag)Comment #8
bcobin commentedBrilliant! Now why didn't I think of that? ;-)
Works like a charm - almost.
One modification: At least for the way I'm using the theme, the
<body <?php print $body_attributes; ?> center">as you're suggesting in item 2 of #7 creates double class definitions. (e.g., .ntype-page .content affects all content in the container, rather than just in the page.)
Insofar as all the content (page, story, etc.) is going into the $content sections, node.tpl.php seems to handle everything just fine. Woo hoo!
Using
<body class="center">instead results in the expected behavior and everything seems much more "normal."Thanks so much, Caleb - that's much better! Great work... rock on!
Comment #9
calebgilbert commentedFixed in ATCK 6.6