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.
| Attachment | Size |
|---|---|
| Missing_Block.jpg | 162.32 KB |

Comments
Doh!
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.)