/**
  * Generate the page title again as TSFE->altPageTitle might have been modified by an inc script
  *
  * @return void
  */
 protected function regeneratePageTitle()
 {
     \TYPO3\CMS\Frontend\Page\PageGenerator::generatePageTitle();
 }
 /**
  * Initializes the title for the RSS feed of the current action consisting
  * of the page title and the content element header.
  *
  * @param \TYPO3\CMS\Extbase\Mvc\View\ViewInterface $view
  */
 protected function initializeRssTitle(\TYPO3\CMS\Extbase\Mvc\View\ViewInterface $view)
 {
     if (!empty($this->settings['list']['rss']['channel']['title'])) {
         $view->assign('rssTitle', $this->settings['list']['rss']['channel']['title']);
         return;
     }
     $rssTitle = $this->configurationManager->getContentObject()->data['header'];
     \TYPO3\CMS\Frontend\Page\PageGenerator::generatePageTitle();
     $rssTitle .= ' - ' . $this->getTypoScriptFrontendController()->getPageRenderer()->getTitle();
     $view->assign('rssTitle', $rssTitle);
 }
 /**
  * Generate the page title again as TSFE->altPageTitle might have been modified by an inc script
  *
  * @return void
  */
 protected function regeneratePageTitle()
 {
     PageGenerator::generatePageTitle();
 }
예제 #4
0
 /**
  * Generate the body content
  *
  * If there is an error, no reference to a record, a Flash Message will be
  * displayed
  *
  * @return string The body content
  */
 protected function getBodyContent($data, $table)
 {
     // template1
     $wizardView = GeneralUtility::makeInstance(\TYPO3\CMS\Fluid\View\StandaloneView::class);
     $wizardView->setFormat('html');
     $wizardView->setLayoutRootPaths([10 => ExtensionManagementUtility::extPath('cs_seo') . '/Resources/Private/Layouts/']);
     $wizardView->setTemplatePathAndFilename(ExtensionManagementUtility::extPath('cs_seo') . 'Resources/Private/Templates/Wizard.html');
     if (strpos($data['uid'], 'NEW') === false) {
         // set pageID for TSSetup check
         $pageUid = $table == 'pages' ? $data['uid'] : $data['pid'];
         $_GET['id'] = $pageUid;
         // check if TS page type exists
         /** @var BackendConfigurationManager $configurationManager */
         $backendConfigurationManager = GeneralUtility::makeInstance(BackendConfigurationManager::class);
         $fullTS = $backendConfigurationManager->getTypoScriptSetup();
         if (isset($fullTS['types.'][$this->typeNum])) {
             // render page title
             $rootline = BackendUtility::BEgetRootLine($pageUid);
             /** @var TSFEUtility $TSFEUtility */
             $TSFEUtility = GeneralUtility::makeInstance(TSFEUtility::class, $pageUid, $data['sys_language_uid']);
             $siteTitle = $TSFEUtility->getSiteTitle();
             $pageTitleSeparator = $TSFEUtility->getPageTitleSeparator();
             $config = $TSFEUtility->getConfig();
             if ($table == 'pages' || $table == 'pages_language_overlay') {
                 PageGenerator::generatePageTitle();
                 $pageTitle = static::getPageRenderer()->getTitle();
                 // get page path
                 $path = $TSFEUtility->getPagePath();
                 // TYPO3 8
                 $urlScheme = is_array($data['url_scheme']) ? $data['url_scheme'][0] : $data['url_scheme'];
                 // check if path is absolute
                 if (strpos($path, '://') !== false) {
                     $path = '';
                 }
             } else {
                 $pageTitle = $TSFEUtility->getFinalTitle($data['title'], $data['title_only']);
                 $path = '';
                 $urlScheme = 'http://';
             }
             $wizardView->assignMultiple(['config' => $config, 'domain' => BackendUtility::firstDomainRecord($rootline), 'data' => $data, 'pageTitle' => $pageTitle, 'pageTitleSeparator' => $pageTitleSeparator, 'path' => $path, 'siteTitle' => $siteTitle, 'urlScheme' => $urlScheme]);
         } else {
             $wizardView->assign('error', 'no_ts');
         }
     } else {
         $wizardView->assign('error', 'no_data');
     }
     return $wizardView->render();
 }