Usage Examples
Learn how to use the enhanced components in your pages.
Enhanced Hero Component
// New array-based configuration
$page = initMainSitePage([
'heroTitle' => 'Your Title',
'heroSubtitle' => 'Optional subtitle',
'heroLayout' => 'split', // grid, centered, split
'heroAlignment' => 'center',
'heroSecondaryCta' => [
'text' => 'Learn More',
'link' => '/learn'
]
]);
// Legacy support still works
renderHero('Title', 'Description', 'CTA', '/link', true);
Navigation Component
// Configure navigation options
'navOptions' => [
'hideMenuItems' => ['about', 'quote'],
'customMenuItems' => [
[
'text' => 'Resources',
'url' => '/resources',
'dropdown' => [
['text' => 'Downloads', 'url' => '/downloads'],
['text' => 'Support', 'url' => '/support']
]
]
],
'customLogo' => '/custom-logo.png'
]
Bootstrap System
// Enhanced initialization
$page = initMainSitePage([
'title' => 'Page Title',
'heroLayout' => 'split',
'navOptions' => [...],
// All enhanced options available
]);
// Automatic component loading and configuration
$page->renderPageHeader(); // Includes all enhancements
$page->renderPageFooter();