/** * Includes the current page. A page may be provided by the core, an addon or plugin. */ public static function includeCurrentPage() { $currentPage = self::getCurrentPageObject(); if (rex_request::isPJAXRequest() && !rex_request::isPJAXContainer('#rex-page')) { // non-core pjax containers should not have a layout. // they render their whole response on their own $currentPage->setHasLayout(false); } require rex_path::core('layout/top.php'); $path = $currentPage->getPath(); $pattern = '@' . preg_quote(rex_path::src('addons/'), '@') . '([^/\\\\]+)(?:[/\\\\]plugins[/\\\\]([^/\\\\]+))?@'; if (preg_match($pattern, $path, $matches)) { $package = rex_addon::get($matches[1]); if (isset($matches[2])) { $package = $package->getPlugin($matches[2]); } $package->includeFile(str_replace($package->getPath(), '', $path)); } else { include $path; } require rex_path::core('layout/bottom.php'); }
<?php $curPage = rex_be_controller::getCurrentPageObject(); if (!$curPage->hasLayout()) { if (rex_request::isPJAXRequest()) { echo '</section>'; } return; } ?> </section></div><?php if (rex_request::isPJAXContainer('#rex-js-page-container')) { return; } echo '</div>'; $sidebar = rex_extension::registerPoint(new rex_extension_point('PAGE_SIDEBAR', '')); if ($sidebar != '') { $sidebarfragment = new rex_fragment(); $sidebarfragment->content = $sidebar; echo $sidebarfragment->parse('core/sidebar.php'); unset($sidebarfragment); } unset($fragment); $footerfragment = new rex_fragment(); $footerfragment->setVar('time', rex::getProperty('timer')->getFormattedDelta(rex_timer::SEC)); echo $footerfragment->parse('core/footer.php'); unset($footerfragment); $bottomfragment = new rex_fragment(); echo $bottomfragment->parse('core/bottom.php'); unset($bottomfragment);
/** * Includes the current page. A page may be provided by the core, an addon or plugin. */ public static function includeCurrentPage() { $currentPage = self::getCurrentPageObject(); if (rex_request::isPJAXRequest() && !rex_request::isPJAXContainer('#rex-js-page-container')) { // non-core pjax containers should not have a layout. // they render their whole response on their own $currentPage->setHasLayout(false); } require rex_path::core('layout/top.php'); self::includePath($currentPage->getPath()); require rex_path::core('layout/bottom.php'); }