- Fixed breadcrumb method name (render() -> render_breadcrumbs()) - Resolved two-column layout by moving navigation inside content wrapper - Added dedicated CSS to force single-column layout - Updated hierarchical URL detection for master dashboard pages - Updated TROUBLESHOOTING.md with complete master dashboard fixes - Removed redundant authentication blocking content display
59 lines
No EOL
1.7 KiB
PHP
59 lines
No EOL
1.7 KiB
PHP
<?php
|
|
/**
|
|
* Template Name: Master Trainers
|
|
* Description: Template for the master trainer's all trainers management page
|
|
*/
|
|
|
|
// Define constant to indicate we are in a page template
|
|
if (!defined('HVAC_IN_PAGE_TEMPLATE')) {
|
|
define('HVAC_IN_PAGE_TEMPLATE', true);
|
|
}
|
|
|
|
get_header();
|
|
|
|
// Authentication handled by centralized HVAC_Access_Control system
|
|
// Redundant template-level auth check removed to prevent content blocking
|
|
|
|
// Render master trainer navigation
|
|
if (class_exists('HVAC_Master_Menu_System')) {
|
|
$master_menu = HVAC_Master_Menu_System::instance();
|
|
$master_menu->render_master_menu();
|
|
}
|
|
|
|
// Render breadcrumbs
|
|
if (class_exists('HVAC_Breadcrumbs')) {
|
|
HVAC_Breadcrumbs::render();
|
|
}
|
|
|
|
echo '<div class="hvac-page-wrapper hvac-master-trainers-page">';
|
|
echo '<div class="container">';
|
|
|
|
// Render the master trainers content
|
|
echo '<h1>All Trainers</h1>';
|
|
echo '<div class="hvac-master-trainers-content">';
|
|
|
|
// Debug: Check if shortcode function exists and render accordingly
|
|
echo '<!-- DEBUG: Master trainers page content -->';
|
|
if (function_exists('hvac_render_master_trainers')) {
|
|
echo '<p>Loading master trainers via function...</p>';
|
|
ob_start();
|
|
echo hvac_render_master_trainers();
|
|
$content = ob_get_clean();
|
|
echo $content;
|
|
} else {
|
|
echo '<p>Loading master trainers via shortcode...</p>';
|
|
ob_start();
|
|
echo do_shortcode('[hvac_master_trainers]');
|
|
$content = ob_get_clean();
|
|
if (empty(trim($content))) {
|
|
echo '<div class="hvac-notice">Master trainers shortcode is not available. Please contact an administrator.</div>';
|
|
} else {
|
|
echo $content;
|
|
}
|
|
}
|
|
|
|
echo '</div>'; // .hvac-master-trainers-content
|
|
echo '</div>'; // .container
|
|
echo '</div>'; // .hvac-page-wrapper
|
|
|
|
get_footer(); |