<?php
/**
 * Template Name: Master Dashboard
 * Description: Template for the master trainer dashboard page
 */

// Define constant to indicate we are in a page template
define('HVAC_IN_PAGE_TEMPLATE', true);

get_header();

// Debug output
echo '<!-- page-master-dashboard.php template loaded -->';
echo '<!-- Page ID: ' . get_the_ID() . ' -->';
echo '<!-- Page Title: ' . get_the_title() . ' -->';

// Force render the master dashboard content directly
if (class_exists('HVAC_Community_Events')) {
    $hvac = HVAC_Community_Events::instance();
    if (method_exists($hvac, 'render_master_dashboard')) {
        echo '<!-- Calling render_master_dashboard directly -->';
        echo $hvac->render_master_dashboard();
    } else {
        echo '<!-- render_master_dashboard method not found -->';
        echo do_shortcode('[hvac_master_dashboard]');
    }
} else {
    echo '<!-- HVAC_Community_Events class not found -->';
    echo do_shortcode('[hvac_master_dashboard]');
}

get_footer();
