/** * initialize various variables and generate the template * @return QuickTemplate */ protected function prepareQuickTemplate() { $appleTouchIcon = $this->getConfig()->get('AppleTouchIcon'); $out = $this->getOutput(); // add head items if ($appleTouchIcon !== false) { $out->addLink(array('rel' => 'apple-touch-icon', 'href' => $appleTouchIcon)); } $out->addMeta('viewport', 'initial-scale=1.0, user-scalable=yes, minimum-scale=0.25, ' . 'maximum-scale=5.0, width=device-width'); // Generate skin template $tpl = parent::prepareQuickTemplate(); // Set whether or not the page content should be wrapped in div.content (for // example, on a special page) $tpl->set('unstyledContent', $out->getProperty('unstyledContent')); // Set the links for the main menu $tpl->set('menu_data', $this->getMenuData()); // Set the links for page secondary actions $tpl->set('secondary_actions', $this->getSecondaryActions($tpl)); // Construct various Minerva-specific interface elements $this->preparePageContent($tpl); $this->prepareHeaderAndFooter($tpl); $this->prepareMenuButton($tpl); $this->prepareBanners($tpl); $this->prepareWarnings($tpl); $this->preparePageActions($tpl); $this->prepareUserButton($tpl); $this->prepareLanguages($tpl); return $tpl; }
/** * initialize various variables and generate the template * @return QuickTemplate */ protected function prepareQuickTemplate() { $appleTouchIcon = $this->getConfig()->get('AppleTouchIcon'); $out = $this->getOutput(); // add head items if ($appleTouchIcon !== false) { $out->addHeadItem('touchicon', Html::element('link', array('rel' => 'apple-touch-icon', 'href' => $appleTouchIcon))); } $out->addHeadItem('viewport', Html::element('meta', array('name' => 'viewport', 'content' => 'initial-scale=1.0, user-scalable=yes, minimum-scale=0.25, ' . 'maximum-scale=5.0, width=device-width'))); // Generate skin template $tpl = parent::prepareQuickTemplate(); // Set whether or not the page content should be wrapped in div.content (for // example, on a special page) $tpl->set('unstyledContent', $out->getProperty('unstyledContent')); // Set the links for the main menu $tpl->set('menu_data', $this->getMenuData()); // Set the links for page secondary actions $tpl->set('secondary_actions', $this->getSecondaryActions($tpl)); // Construct various Minerva-specific interface elements $this->preparePageContent($tpl); $this->prepareHeaderAndFooter($tpl); $this->prepareMenuButton($tpl); $this->prepareBanners($tpl); $this->prepareWarnings($tpl); $this->preparePageActions($tpl); $this->prepareUserButton($tpl); $this->prepareLanguages($tpl); if ($this->isMenuEnabled) { $templateParser = new TemplateParser(__DIR__ . '/../../resources/skins.minerva.scripts/'); $tpl->set('menuhtml', $templateParser->processTemplate('menu', $tpl->data['menu_data'])); } else { $tpl->set('menuhtml', ''); } return $tpl; }
/** * initialize various variables and generate the template * @return QuickTemplate */ protected function prepareQuickTemplate() { $appleTouchIcon = $this->getConfig()->get('AppleTouchIcon'); $out = $this->getOutput(); // add head items if ($appleTouchIcon !== false) { $out->addHeadItem('touchicon', Html::element('link', array('rel' => 'apple-touch-icon', 'href' => $appleTouchIcon))); } $out->addHeadItem('viewport', Html::element('meta', array('name' => 'viewport', 'content' => 'initial-scale=1.0, user-scalable=yes, minimum-scale=0.25, ' . 'maximum-scale=5.0, width=device-width'))); if ($this->isMobileMode) { // Customize page content for mobile view, e.g. add togglable sections, filter // out various elements. // We do this before executing parent::prepareQuickTemplate() since the parent // overwrites $out->mBodytext, adding an mw-content-text div which is // redundant to our own content div. By defining the bodytext HTML before // $out->mBodytext is overwritten, we avoid including the mw-content-text div. // FIXME: Git rid of our content div and consolidate this line with the other // isMobileMode lines below. This will bring us more in line with core DOM. $html = ExtMobileFrontend::DOMParse($out); } // Generate skin template $tpl = parent::prepareQuickTemplate(); // Set whether or not the page content should be wrapped in div.content (for // example, on a special page) $tpl->set('unstyledContent', $out->getProperty('unstyledContent')); // Set the links for the main menu $tpl->set('menu_data', $this->getMenuData()); // Set the links for page secondary actions $tpl->set('secondary_actions', $this->getSecondaryActions($tpl)); // Construct various Minerva-specific interface elements $this->preparePageContent($tpl); $this->prepareHeaderAndFooter($tpl); $this->prepareMenuButton($tpl); $this->prepareBanners($tpl); $this->prepareWarnings($tpl); $this->preparePageActions($tpl); $this->prepareUserButton($tpl); $this->prepareLanguages($tpl); // Perform a few extra changes if we are in mobile mode if ($this->isMobileMode) { // Set our own bodytext that has been filtered by MobileFormatter $tpl->set('bodytext', $html); // Construct mobile-friendly footer $this->prepareMobileFooterLinks($tpl); } return $tpl; }