Drupal 6: views_embed_view() doesn't appear to be rendering

Events happening in the community are now at Drupal community events on www.drupal.org.
jessSchn's picture

I recently edited a template file (node-training_class.tpl.php) for training classes on one of my Drupal 6 websites (http://www.helpsystems.com/services/training/robotschedule-operations).

This template file needs to embed a Block(Next Instance (Webinar)) that is being configured by a View (view: Upcoming_Class_Instances).

Here is my code:

<?php foreach($node->taxonomy as $term) {  $class_type = $term->name; }
               
if (
$class_type == "Webinar" || $class_type == "Free Online Training") {
  print
views_embed_view('Upcoming_Class_Instances', $display_id = 'block_2');
}

if (
$class_type == "Online Training" || $class_type == "Class") {
  print
views_embed_view('Upcoming_Class_Instances', $display_id = 'block_3');
}
              
?>

Obviously, I'm selecting a taxonomy term on the content type and then embedding the correct Block based on the taxonomy term.

Here is the weird part: Currently all existing Training Classes are working just fine with the template file. BUT if I add a new Training class then my Block is not getting rendered on the page (there is just a white blank spot on the right side where the block should be displaying).

Can anyone help me understand or debug why existing Training Classes are displaying just fine but any new Training Classes are not displaying the block?

Thanks.

AttachmentSize
Missing_Block.jpg162.32 KB

Comments

Doh!

jessSchn's picture

Okay, so I'm having an off day. The reason why my block wasn't displaying is because there are two parts to the Training Class setup and I had not completed the second step.

Everything is working just fine. (Thank goodness it's almost Friday.)

Twin Cities

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: