$node not available to all of advanced_forum.post.tpl

friolator - July 27, 2009 - 19:48
Project:Advanced Forum
Version:6.x-2.0-alpha1
Component:Miscellaneous
Category:support request
Priority:minor
Assigned:Unassigned
Status:closed
Description

According to the header for advanced_forum.post.tpl:

* All variables available in node.tpl.php and comment.tpl.php for your theme
* are available here. In addition, Advanced Forum makes available the following
* variables:

However, it seems that this is only the case if $top_post evaluates to false. Any time we try to print out $node->title within an if ($top_post) it fails to print. If we move it outside of that test, it works. I've verified that it's not a problem with our code, by placing it into the first few lines of code that are part of the default template file, which is correctly testing $top_post and only displaying the topic header when appropriate:

<?php if ($top_post): ?>
  <?php print $node->title;?>
  <?php print $topic_header ?>
<?php else: ?>
  <a id="comment-<?php print $node->nid; ?>"></a>
<?php endif; ?>

$node->title fails to print. But if I move it into the else, or outside of the if statement entirely, it works fine.

#1

Michelle - July 30, 2009 - 03:39
Category:bug report» support request
Status:active» postponed (maintainer needs more info)

I can't reproduce this and I can't see anything in the code that would delete the title out of the node object. My best guess is there's some other module that's affecting it... Are you using comment or nodecomment for the replies. You say you're getting the title on the replies so that might give us a clue.

Michelle

#2

Michelle - October 17, 2009 - 03:56
Status:postponed (maintainer needs more info)» closed

No answer in 11 weeks. Closing.

Michelle

 
 

Drupal is a registered trademark of Dries Buytaert.