diff --git a/Classes/Command/CdnToLocal.php b/Classes/Command/CdnToLocal.php index 17ca2349..68dfc073 100644 --- a/Classes/Command/CdnToLocal.php +++ b/Classes/Command/CdnToLocal.php @@ -76,17 +76,17 @@ protected function execute(InputInterface $input, OutputInterface $output) if ($settings['cdn']['bootswatch']) { $bootswatchTheme = $settings['cdn']['bootswatch']; - $cdnPath = 'https://stackpath.bootstrapcdn.com/bootswatch/'.$settings['cdn']['bootstrap'].'/'.$bootswatchTheme.'/bootstrap.min.css'; + $cdnPath = 'https://cdn.jsdelivr.net/npm/bootswatch@'.$settings['cdn']['bootstrap'].'/dist/'.$bootswatchTheme.'/bootstrap.min.css'; self::writeCustomFile($customPath, $customFileName, $cdnPath, true); } else { - $cdnPath = 'https://stackpath.bootstrapcdn.com/bootstrap/'.$settings['cdn']['bootstrap'].'/css/bootstrap.min.css'; + $cdnPath = 'https://cdn.jsdelivr.net/npm/bootstrap@'.$settings['cdn']['bootstrap'].'/dist/css/bootstrap.min.css'; self::writeCustomFile($customPath, $customFileName, $cdnPath, true); } $customDir = 'fileadmin/T3SB/Resources/Public/JS/'; $customPath = GeneralUtility::getFileAbsFileName($customDir); $customFileName = 'bootstrap.min.js'; - $cdnPath = 'https://stackpath.bootstrapcdn.com/bootstrap/'.$version.'/js/bootstrap.min.js'; + $cdnPath = 'https://cdn.jsdelivr.net/npm/bootstrap@'.$version.'/dist/js/bootstrap.min.js'; self::writeCustomFile($customPath, $customFileName, $cdnPath); } diff --git a/Classes/Controller/ConfigController.php b/Classes/Controller/ConfigController.php index cfaa0459..473e32e5 100644 --- a/Classes/Controller/ConfigController.php +++ b/Classes/Controller/ConfigController.php @@ -23,6 +23,7 @@ use TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface; use TYPO3\CMS\Backend\View\BackendTemplateView; + /** * ConfigController */ @@ -87,12 +88,27 @@ public function listAction() $pageRepository = GeneralUtility::makeInstance(\TYPO3\CMS\Frontend\Page\PageRepository::class); } + $childPages = $pageRepository->getMenu((int)$_GET['id'], 'uid'); + $childUids = array_keys($childPages); + $subChildPages = $pageRepository->getMenu($childUids, 'uid'); + $allPages = array_merge($childPages, $subChildPages); + foreach ( $allPages as $page ) { + $pageList .= $page['uid'].','; + } + $pageList = rtrim($pageList, ','); + $configRepository = $this->configRepository->findAll(); foreach ( $configRepository as $key => $config ) { - $page = $pageRepository->getPage($config->getPid()); - $allConfig[$page['uid']]['title'] = $page['title']; - $allConfig[$page['uid']]['uid'] = $page['uid']; + + if (\TYPO3\CMS\Core\Utility\GeneralUtility::inList($pageList, $config->getPid())) { + + $page = $pageRepository->getPage($config->getPid()); + + $allConfig[$page['uid']]['title'] = $page['title']; + $allConfig[$page['uid']]['uid'] = $page['uid']; + + } } $assignedOptions['allConfig'] = $allConfig; @@ -137,7 +153,7 @@ public function newAction() if ( $rootConfig ) { // config from rootline - if ( $this->settings['t3sbConfig']['rootline'] ) { + if ( $rootConfig->getGeneralRootline() ) { $rootLineArray = GeneralUtility::makeInstance(RootlineUtility::class, (int)$_GET['id'])->get(); @@ -219,6 +235,9 @@ public function createAction(\T3SBS\T3sbootstrap\Domain\Model\Config $newConfig) $newConfig->setHomepageUid($homepageUid); $newConfig->setPid((int)$_GET['id']); $this->configRepository->add($newConfig); + $persistenceManager = $this->objectManager->get("TYPO3\\CMS\\Extbase\\Persistence\\Generic\\PersistenceManager"); + $persistenceManager->persistAll(); + self::writeConstants(); parent::redirect('list'); } @@ -288,6 +307,10 @@ public function updateAction(\T3SBS\T3sbootstrap\Domain\Model\Config $config) $config->setHomepageUid($homepageUid); $this->configRepository->update($config); + $persistenceManager = $this->objectManager->get("TYPO3\\CMS\\Extbase\\Persistence\\Generic\\PersistenceManager"); + $persistenceManager->persistAll(); + self::writeConstants(); + parent::redirect('edit',NULL,Null,array('config' => $config)); } @@ -302,6 +325,10 @@ public function deleteAction(\T3SBS\T3sbootstrap\Domain\Model\Config $config) { $this->addFlashMessage('The object was deleted.', '', FlashMessage::INFO); $this->configRepository->remove($config); + $persistenceManager = $this->objectManager->get("TYPO3\\CMS\\Extbase\\Persistence\\Generic\\PersistenceManager"); + $persistenceManager->persistAll(); + self::writeConstants(); + parent::redirect('list'); } @@ -463,12 +490,14 @@ public function getNewConfig(\T3SBS\T3sbootstrap\Domain\Model\Config $rootConfig $newConfig->setExpandedcontentContainertop( $rootConfig->getExpandedcontentContainertop() ); $newConfig->setExpandedcontentClasstop( $rootConfig->getExpandedcontentClasstop() ); - $newConfig->setexpandedcontentEnablebottom( $rootConfig->getexpandedcontentEnablebottom() ); + $newConfig->setExpandedcontentEnablebottom( $rootConfig->getExpandedcontentEnablebottom() ); $newConfig->setExpandedcontentSlidebottom( $rootConfig->getExpandedcontentSlidebottom() ); $newConfig->setExpandedcontentContainerpositionbottom( $rootConfig->getExpandedcontentContainerpositionbottom() ); $newConfig->setExpandedcontentContainerbottom( $rootConfig->getExpandedcontentContainerbottom() ); $newConfig->setExpandedcontentClassbottom( $rootConfig->getExpandedcontentClassbottom() ); + $newConfig->setGeneralRootline( $rootConfig->getGeneralRootline() ); + return $newConfig; } @@ -527,7 +556,7 @@ protected function compareConfig($config) $compare = []; $rootConfig = $this->configRepository->findOneByPid(self::getRootPageUid()); - $fileds = 'getCompany, getHomepageUid, getPageTitle, getPageTitlealign, getPageTitlecontainer, getPageTitleclass, getMetaEnable, getMetaValue, getMetaContainer, getMetaClass, getMetaText, getNavbarEnable, getNavbarEntrylevel, getNavbarLevels, getNavbarExcludeuiduist, getNavbarIncludespacer, getNavbarJustify, getNavbarSectionmenu, getNavbarMegamenu, getNavbarHover, getNavbarClickableparent, getNavbarBrand, getNavbarImage, getNavbarColor, getNavbarShrinkcolorschemes, getNavbarShrinkcolor, getNavbarBackground, getNavbarContainer, getNavbarPlacement, getNavbarAlignment, getNavbarClass, getNavbarToggler, getNavbarBreakpoint, getNavbarOffcanvas, getNavbarHeight, getNavbarSearchbox, getNavbarLangmenu, getJumbotronEnable, getJumbotronBgimage, getJumbotronFluid, getJumbotronSlide, getJumbotronPosition, getJumbotronContainer, getJumbotronContainerposition, getJumbotronClass, getBreadcrumbEnable, getBreadcrumbNotonrootpage, getBreadcrumbFaicon, getBreadcrumbCorner, getBreadcrumbBottom, getBreadcrumbPosition, getBreadcrumbContainer, getBreadcrumbContainerposition, getBreadcrumbClass, getSidebarEnable, getSidebarRightenable, , getSidebarEntrylevel, getSidebarLevels, getSidebarExcludeuiduist, getSidebarIncludespacer, getFooterEnable, getFooterFluid, getFooterSlide, getFooterSticky, getFooterContainer, getFooterContainerposition, getFooterClass, getFooterPid, getExpandedcontentEnabletop, getExpandedcontentSlidetop, getExpandedcontentContainerpositiontop, getExpandedcontentContainertop, getExpandedcontentClasstop, getexpandedcontentEnablebottom, getExpandedcontentSlidebottom, getExpandedcontentContainerpositionbottom, getExpandedcontentContainerbottom, getExpandedcontentClassbottom'; + $fileds = 'getCompany, getHomepageUid, getPageTitle, getPageTitlealign, getPageTitlecontainer, getPageTitleclass, getMetaEnable, getMetaValue, getMetaContainer, getMetaClass, getMetaText, getNavbarEnable, getNavbarEntrylevel, getNavbarLevels, getNavbarExcludeuiduist, getNavbarIncludespacer, getNavbarJustify, getNavbarSectionmenu, getNavbarMegamenu, getNavbarHover, getNavbarClickableparent, getNavbarBrand, getNavbarImage, getNavbarColor, getNavbarShrinkcolorschemes, getNavbarShrinkcolor, getNavbarBackground, getNavbarContainer, getNavbarPlacement, getNavbarAlignment, getNavbarClass, getNavbarToggler, getNavbarBreakpoint, getNavbarOffcanvas, getNavbarHeight, getNavbarSearchbox, getNavbarLangmenu, getJumbotronEnable, getJumbotronBgimage, getJumbotronFluid, getJumbotronSlide, getJumbotronPosition, getJumbotronContainer, getJumbotronContainerposition, getJumbotronClass, getBreadcrumbEnable, getBreadcrumbNotonrootpage, getBreadcrumbFaicon, getBreadcrumbCorner, getBreadcrumbBottom, getBreadcrumbPosition, getBreadcrumbContainer, getBreadcrumbContainerposition, getBreadcrumbClass, getSidebarEnable, getSidebarRightenable, , getSidebarEntrylevel, getSidebarLevels, getSidebarExcludeuiduist, getSidebarIncludespacer, getFooterEnable, getFooterFluid, getFooterSlide, getFooterSticky, getFooterContainer, getFooterContainerposition, getFooterClass, getFooterPid, getExpandedcontentEnabletop, getExpandedcontentSlidetop, getExpandedcontentContainerpositiontop, getExpandedcontentContainertop, getExpandedcontentClasstop, getExpandedcontentEnablebottom, getExpandedcontentSlidebottom, getExpandedcontentContainerpositionbottom, getExpandedcontentContainerbottom, getExpandedcontentClassbottom, getGeneralRootline'; $filedsArr = GeneralUtility::trimExplode(',', $fileds, 1); @@ -556,7 +585,11 @@ protected function compareConfig($config) } - + /** + * SCSS in the BE + * + * @return array + */ public function getCustomScss( $file ) { $customScssDir = $this->settings['customScssPath'] ? $this->settings['customScssPath'] : 'fileadmin/T3SB/SCSS/'; @@ -625,7 +658,11 @@ public function getCustomScss( $file ) { } - + /** + * Delete files from directory + * + * @return void + */ public function deleteFilesFromDirectory($directory){ if (is_dir($directory)) { if ($dh = opendir($directory)) { @@ -639,4 +676,194 @@ public function deleteFilesFromDirectory($directory){ } } + + /** + * Write data from DB to constant file and import in sys_template + * + * @return void + */ + public function writeConstants() { + + $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('sys_template'); + $rootTemplates = $queryBuilder + ->select('uid','pid', 'constants') + ->from('sys_template') + ->where( + $queryBuilder->expr()->eq('root', $queryBuilder->createNamedParameter(1, \PDO::PARAM_INT)) + ) + ->execute()->fetchAll(); + + + if ( count($rootTemplates) ) { + + $configRepository = $this->configRepository->findAll(); + + foreach ($rootTemplates as $key=>$rootTemplate) { + + $import = "@import 'fileadmin/T3SB/Configuration/TypoScript/t3sbconstants-".$rootTemplate['pid'].".typoscript'"; + + $pos = strpos($rootTemplate['constants'], $import); + + if ($pos === FALSE) { + + $setConstants = "# Please do not delete or comment out the following line".PHP_EOL; + $setConstants .= $import.PHP_EOL; + $setConstants .= $rootTemplate['constants']; + + $update = $queryBuilder + ->update('sys_template') + ->where( + $queryBuilder->expr()->eq('uid', $queryBuilder->createNamedParameter($rootTemplate['uid'], \PDO::PARAM_INT)) + ) + ->set('constants', $setConstants) + ->execute(); + } + + $filecontent = ''; + + foreach ( $configRepository as $config ) { + + if ( $config->getPid() == $rootTemplate['pid'] ) { + $filecontent .= self::getContents($config).PHP_EOL; + + } else { + + $rootLineArray = GeneralUtility::makeInstance(RootlineUtility::class, $config->getPid())->get(); + + if ($rootLineArray[0]['uid'] == $rootTemplate['pid'] ){ + + if ($config->getGeneralRootline() || $config->getNavbarMegamenu()) { + $filecontent .= '['.$config->getPid().' in tree.rootLineIds]'.PHP_EOL; + } else { + $filecontent .= '[page["uid"] == '.$config->getPid().']'.PHP_EOL; + } + + $filecontent .= self::getContents($config); + $filecontent .= '[END]'.PHP_EOL.PHP_EOL; + } + } + } + + $customDir = 'fileadmin/T3SB/Configuration/TypoScript/'; + $customPath = GeneralUtility::getFileAbsFileName($customDir); + $customFileName = 't3sbconstants-'.$rootTemplate['pid'].'.typoscript'; + $customFile = $customPath.$customFileName; + + if (file_exists($customFile)) { + unlink($customFile); + } + if (!is_dir($customPath)) { + mkdir($customPath, 0777, true); + } + + GeneralUtility::writeFile($customFile, $filecontent); + + } + } + + } + + + /** + * Get the data from DB + * + * @param \T3SBS\T3sbootstrap\Domain\Model\Config $config + * @return string + */ + private function getContents(\T3SBS\T3sbootstrap\Domain\Model\Config $config) { + + $constants = 'bootstrap.db.uid = '.$config->getUid() .PHP_EOL; + $constants .= 'bootstrap.db.company = '.$config->getCompany() .PHP_EOL; + $constants .= 'bootstrap.db.homepage_uid = '.$config->getHomepageUid() .PHP_EOL; + + $constants .= 'bootstrap.db.page_title = '.$config->getPageTitle() .PHP_EOL; + $constants .= 'bootstrap.db.page_titlealign = '.$config->getPageTitlealign() .PHP_EOL; + $constants .= 'bootstrap.db.page_titlecontainer = '.$config->getPageTitlecontainer() .PHP_EOL; + $constants .= 'bootstrap.db.page_titleclass = '.$config->getPageTitleclass() .PHP_EOL; + + $constants .= 'bootstrap.db.meta_enable = '.$config->getMetaEnable() .PHP_EOL; + $constants .= 'bootstrap.db.meta_value = '.$config->getMetaValue() .PHP_EOL; + $constants .= 'bootstrap.db.meta_container = '.$config->getMetaContainer() .PHP_EOL; + $constants .= 'bootstrap.db.meta_class = '.$config->getMetaClass() .PHP_EOL; + $constants .= 'bootstrap.db.meta_text = '.$config->getMetaText() .PHP_EOL; + + $constants .= 'bootstrap.db.navbar_enable = '.$config->getNavbarEnable() .PHP_EOL; + $constants .= 'bootstrap.db.navbar_entrylevel = '.$config->getNavbarEntrylevel() .PHP_EOL; + $constants .= 'bootstrap.db.navbar_levels = '.$config->getNavbarLevels() .PHP_EOL; + $constants .= 'bootstrap.db.navbar_excludeuiduist = '.$config->getNavbarExcludeuiduist() .PHP_EOL; + $constants .= 'bootstrap.db.navbar_includespacer = '.$config->getNavbarIncludespacer() .PHP_EOL; + $constants .= 'bootstrap.db.navbar_justify = '.$config->getNavbarJustify() .PHP_EOL; + $constants .= 'bootstrap.db.navbar_sectionmenu = '.$config->getNavbarSectionmenu() .PHP_EOL; + $constants .= 'bootstrap.db.navbar_megamenu = '.$config->getNavbarMegamenu() .PHP_EOL; + $constants .= 'bootstrap.db.navbar_hover = '.$config->getNavbarHover() .PHP_EOL; + $constants .= 'bootstrap.db.navbar_clickableparent = '.$config->getNavbarClickableparent() .PHP_EOL; + $constants .= 'bootstrap.db.navbar_brand = '.$config->getNavbarBrand() .PHP_EOL; + $constants .= 'bootstrap.db.navbar_image = '.$config->getNavbarImage() .PHP_EOL; + $constants .= 'bootstrap.db.navbar_color = '.$config->getNavbarColor() .PHP_EOL; + $constants .= 'bootstrap.db.navbar_background = '.$config->getNavbarBackground() .PHP_EOL; + $constants .= 'bootstrap.db.navbar_container = '.$config->getNavbarContainer() .PHP_EOL; + $constants .= 'bootstrap.db.navbar_placement = '.$config->getNavbarPlacement() .PHP_EOL; + $constants .= 'bootstrap.db.navbar_alignment = '.$config->getNavbarAlignment() .PHP_EOL; + $constants .= 'bootstrap.db.navbar_class = '.$config->getNavbarClass() .PHP_EOL; + $constants .= 'bootstrap.db.navbar_toggler = '.$config->getNavbarToggler() .PHP_EOL; + $constants .= 'bootstrap.db.navbar_breakpoint = '.$config->getNavbarBreakpoint() .PHP_EOL; + $constants .= 'bootstrap.db.navbar_offcanvas = '.$config->getNavbarOffcanvas() .PHP_EOL; + $constants .= 'bootstrap.db.navbar_height = '.$config->getNavbarHeight() .PHP_EOL; + $constants .= 'bootstrap.db.navbar_searchbox = '.$config->getNavbarSearchbox() .PHP_EOL; + $constants .= 'bootstrap.db.navbar_langmenu = '.$config->getNavbarLangmenu() .PHP_EOL; + $constants .= 'bootstrap.db.navbar_shrinkcolorschemes = '.$config->getNavbarShrinkcolorschemes() .PHP_EOL; + $constants .= 'bootstrap.db.navbar_shrinkcolor = '.$config->getNavbarShrinkcolor() .PHP_EOL; + + $constants .= 'bootstrap.db.jumbotron_enable = '.$config->getJumbotronEnable() .PHP_EOL; + $constants .= 'bootstrap.db.jumbotron_bgimage = '.$config->getJumbotronBgimage() .PHP_EOL; + $constants .= 'bootstrap.db.jumbotron_fluid = '.$config->getJumbotronFluid() .PHP_EOL; + $constants .= 'bootstrap.db.jumbotron_slide = '.$config->getJumbotronSlide() .PHP_EOL; + $constants .= 'bootstrap.db.jumbotron_position = '.$config->getJumbotronPosition() .PHP_EOL; + $constants .= 'bootstrap.db.jumbotron_container = '.$config->getJumbotronContainer() .PHP_EOL; + $constants .= 'bootstrap.db.jumbotron_containerposition = '.$config->getJumbotronContainerposition() .PHP_EOL; + $constants .= 'bootstrap.db.jumbotron_class = '.$config->getJumbotronClass() .PHP_EOL; + + $constants .= 'bootstrap.db.breadcrumb_enable = '.$config->getBreadcrumbEnable() .PHP_EOL; + $constants .= 'bootstrap.db.breadcrumb_notonrootpage = '.$config->getBreadcrumbNotonrootpage() .PHP_EOL; + $constants .= 'bootstrap.db.breadcrumb_faicon = '.$config->getBreadcrumbFaicon() .PHP_EOL; + $constants .= 'bootstrap.db.breadcrumb_corner = '.$config->getBreadcrumbCorner() .PHP_EOL; + $constants .= 'bootstrap.db.breadcrumb_bottom = '.$config->getBreadcrumbBottom() .PHP_EOL; + $constants .= 'bootstrap.db.breadcrumb_position = '.$config->getBreadcrumbPosition() .PHP_EOL; + $constants .= 'bootstrap.db.breadcrumb_container = '.$config->getBreadcrumbContainer() .PHP_EOL; + $constants .= 'bootstrap.db.breadcrumb_containerposition = '.$config->getBreadcrumbContainerposition() .PHP_EOL; + $constants .= 'bootstrap.db.breadcrumb_class = '.$config->getBreadcrumbClass() .PHP_EOL; + + $constants .= 'bootstrap.db.sidebar_enable = '.$config->getSidebarEnable() .PHP_EOL; + $constants .= 'bootstrap.db.sidebar_rightenable = '.$config->getSidebarRightenable() .PHP_EOL; + $constants .= 'bootstrap.db.sidebar_levels = '.$config->getSidebarEntrylevel() .PHP_EOL; + $constants .= 'bootstrap.db.sidebar_entrylevel = '.$config->getSidebarEntrylevel() .PHP_EOL; + $constants .= 'bootstrap.db.sidebar_excludeuiduist = '.$config->getSidebarExcludeuiduist() .PHP_EOL; + $constants .= 'bootstrap.db.sidebar_includespacer = '.$config->getSidebarIncludespacer() .PHP_EOL; + + $constants .= 'bootstrap.db.footer_enable = '.$config->getFooterEnable() .PHP_EOL; + $constants .= 'bootstrap.db.footer_fluid = '.$config->getFooterFluid() .PHP_EOL; + $constants .= 'bootstrap.db.footer_slide = '.$config->getFooterSlide() .PHP_EOL; + $constants .= 'bootstrap.db.footer_sticky = '.$config->getFooterSticky() .PHP_EOL; + $constants .= 'bootstrap.db.footer_container = '.$config->getFooterContainer() .PHP_EOL; + $constants .= 'bootstrap.db.footer_containerposition = '.$config->getFooterContainerposition() .PHP_EOL; + $constants .= 'bootstrap.db.footer_class = '.$config->getFooterClass() .PHP_EOL; + $constants .= 'bootstrap.db.footer_pid = '.$config->getFooterPid() .PHP_EOL; + + $constants .= 'bootstrap.db.expandedcontent_enabletop = '.$config->getexpandedcontentEnabletop() .PHP_EOL; + $constants .= 'bootstrap.db.expandedcontent_slidetop = '.$config->getExpandedcontentSlidetop() .PHP_EOL; + $constants .= 'bootstrap.db.expandedcontent_containerpositiontop = '.$config->getExpandedcontentContainerpositiontop() .PHP_EOL; + $constants .= 'bootstrap.db.expandedcontent_containertop = '.$config->getExpandedcontentContainertop() .PHP_EOL; + $constants .= 'bootstrap.db.expandedcontent_classtop = '.$config->getExpandedcontentClasstop() .PHP_EOL; + $constants .= 'bootstrap.db.expandedcontent_enablebottom = '.$config->getExpandedcontentEnablebottom() .PHP_EOL; + $constants .= 'bootstrap.db.expandedcontent_slidebottom = '.$config->getExpandedcontentSlidebottom() .PHP_EOL; + $constants .= 'bootstrap.db.expandedcontent_containerpositionbottom = '.$config->getExpandedcontentContainerpositionbottom() .PHP_EOL; + $constants .= 'bootstrap.db.expandedcontent_containerbottom = '.$config->getExpandedcontentContainerbottom() .PHP_EOL; + $constants .= 'bootstrap.db.expandedcontent_classbottom = '.$config->getExpandedcontentClassbottom() .PHP_EOL; + + $constants .= 'bootstrap.db.general_rootline = '.$config->getGeneralRootline() .PHP_EOL; + + return $constants; + } + + } diff --git a/Classes/DataProcessing/BootstrapProcessor.php b/Classes/DataProcessing/BootstrapProcessor.php index 3b63f4c4..467965ae 100644 --- a/Classes/DataProcessing/BootstrapProcessor.php +++ b/Classes/DataProcessing/BootstrapProcessor.php @@ -429,7 +429,7 @@ public function process(ContentObjectRenderer $cObj, array $contentObjectConfigu ############################################################################################################################################## // container class - $processedData['data']['configuid'] = $cObj->stdWrapValue('configuid',$processorConfiguration,''); + $processedData['data']['configuid'] = (int)$processorConfiguration['configuid']; $container = $defaultHelper->getContainerClass($processedData['data']); if ($container && $container != 'colPosContainer') { $processedData['containerPre'] = '
'; diff --git a/Classes/DataProcessing/ConfigProcessor.php b/Classes/DataProcessing/ConfigProcessor.php index 25749e8c..5296b002 100644 --- a/Classes/DataProcessing/ConfigProcessor.php +++ b/Classes/DataProcessing/ConfigProcessor.php @@ -16,7 +16,6 @@ use TYPO3\CMS\Core\Utility\GeneralUtility; use TYPO3\CMS\Core\Page\PageRenderer; -use TYPO3\CMS\Core\Utility\RootlineUtility; use TYPO3\CMS\Core\Site\Entity\SiteInterface; use TYPO3\CMS\Core\Routing\SiteMatcher; use TYPO3\CMS\Frontend\ContentObject\ContentDataProcessor; @@ -96,60 +95,21 @@ public function process(ContentObjectRenderer $cObj, array $contentObjectConfigu $frontendController = self::getFrontendController(); $webp = $this->processorConfiguration['webp']; - // the table to query - $tableName = 'tx_t3sbootstrap_domain_model_config'; - $this->processorConfiguration['pidInList'] = $frontendController->id; + if ( is_numeric($this->contentObjectConfiguration['settings.']['db.']['uid']) ) { - // execute a SQL statement to fetch the records from current page - $records = $this->contentObjectRenderer->getRecords($tableName, $this->processorConfiguration); + $processedRecordVariables = $this->contentObjectConfiguration['settings.']['db.']; - $rootLineArray = GeneralUtility::makeInstance(RootlineUtility::class, (int)$this->processedData['data']['uid'])->get(); - - if ( empty($records) ) { - - if ( $this->processorConfiguration['rootline'] ) { - // config from rootline - // unset current page - $rlA = $rootLineArray; - unset($rlA[count($rlA)-1]); - - foreach ($rlA as $rootline) { - $this->processorConfiguration['pidInList'] = $rootline['uid']; - $records = $this->contentObjectRenderer->getRecords($tableName, $this->processorConfiguration); - - if ( !empty($records) ) break; - } - } else { - // config from root page - if ( $this->processedData['data']['is_siteroot'] ) { - $rootPageUid = $this->processedData['data']['uid']; - } else { - $rootPageUid = $rootLineArray[0]['uid']; - } - $this->processorConfiguration['pidInList'] = $rootPageUid; - $records = $this->contentObjectRenderer->getRecords($tableName, $this->processorConfiguration); - } - } - - if ( empty($records) ) { - - $this->processedData['noConfig'] = TRUE; - - return $this->processedData; + } else { - } else { + $this->processedData['noConfig'] = TRUE; - $this->contentObjectRenderer->start($records[0], $tableName); - $processedRecordVariables = $this->contentDataProcessor->process($this->contentObjectRenderer, $this->processorConfiguration, $records[0]); + return $this->processedData; } // override config by TS if ( $this->contentObjectConfiguration['settings.']['configOverride'] ) { foreach ( $this->contentObjectConfiguration['settings.']['override.'] as $key=>$override ) { - - if ( ($override || $override === '0' || $override === 'false') && $override[1] != '$' ) { - if ( $override === 'none' ) { $processedRecordVariables[$key] = ''; } else { @@ -159,7 +119,6 @@ public function process(ContentObjectRenderer $cObj, array $contentObjectConfigu } } -#\TYPO3\CMS\Extbase\Utility\DebuggerUtility::var_dump($processedRecordVariables, '$processedRecordVariables'); /** * General @@ -192,8 +151,7 @@ public function process(ContentObjectRenderer $cObj, array $contentObjectConfigu $pageRepository = GeneralUtility::makeInstance(\TYPO3\CMS\Frontend\Page\PageRepository::class); } - $rootlinePage = $pageRepository->getPage($frontendController->rootLine[0]['uid']); - + $rootlinePage = $pageRepository->getPage($processedRecordVariables['uid']); $smallColumnsRootline = (int)$rootlinePage['tx_t3sbootstrap_smallColumns']; $smallColumns = $smallColumnsCurrent ?: $smallColumnsRootline; @@ -211,7 +169,7 @@ public function process(ContentObjectRenderer $cObj, array $contentObjectConfigu $threeCol = $currentPage['backend_layout'] == 'pagets__ThreeCol' ? TRUE : FALSE; } else { - foreach ($rootLineArray as $subPage) { + foreach ($frontendController->rootLine as $subPage) { $bel = $subPage['backend_layout_next_level']; if ( !empty($subPage['backend_layout_next_level']) ) break; } @@ -238,11 +196,6 @@ public function process(ContentObjectRenderer $cObj, array $contentObjectConfigu $this->processedData['colMain'] = 9; } - // image from pages media - if ( $processedRecordVariables['pagemedia'] ) { - $this->processedData['pagemedia'] = $processedRecordVariables['pagemedia']; - } - // grid breakpoint $this->processedData['gridBreakpoint'] = $currentPage['tx_t3sbootstrap_breakpoint'] ?: 'md'; @@ -312,7 +265,7 @@ public function process(ContentObjectRenderer $cObj, array $contentObjectConfigu $this->processedData['config']['navbar']['enable'] = $processedRecordVariables['navbar_enable']; $this->processedData['config']['navbar']['sectionMenu'] = $processedRecordVariables['navbar_sectionmenu'] ? ' section-menu' : ''; $this->processedData['config']['navbar']['brand'] = $processedRecordVariables['navbar_brand']; - if ( $rootLineArray[1]['doktype'] == 4) { + if ( $frontendController->rootLine[1]['doktype'] == 4) { $this->processedData['config']['navbar']['clickableparent'] = 1; } else { $this->processedData['config']['navbar']['clickableparent'] = $processedRecordVariables['navbar_clickableparent']; @@ -412,7 +365,7 @@ public function process(ContentObjectRenderer $cObj, array $contentObjectConfigu if ( $processedRecordVariables['jumbotron_bgimage'] == 'root' ) { // slide in rootline - foreach ($rootLineArray as $page) { + foreach ($frontendController->rootLine as $page) { $fileObjects = $fileRepository->findByRelation('pages', 'media', $page['uid']); $uid = $page['uid']; if ($fileObjects) break; @@ -447,7 +400,7 @@ public function process(ContentObjectRenderer $cObj, array $contentObjectConfigu if ( $this->contentObjectConfiguration['settings.']['backgroundImageEnable'] ) { $bgImage = $this->getBackgroundImageUtility()->getBgImage($frontendController->id, 'pages', FALSE, FALSE, [], TRUE, 0, $webp); if ( empty($bgImage) && $this->contentObjectConfiguration['settings.']['backgroundImageSlide'] ) { - foreach ($rootLineArray as $page) { + foreach ($frontendController->rootLine as $page) { $bgImage = $this->getBackgroundImageUtility()->getBgImage($page['uid'], 'pages', FALSE, FALSE, [], TRUE, $frontendController->id, $webp); if ($bgImage) break; } @@ -501,7 +454,6 @@ public function process(ContentObjectRenderer $cObj, array $contentObjectConfigu $footerClass .= $processedRecordVariables['footer_fluid'] ? ' jumbotron-fluid' : ''; $footerClass .= $processedRecordVariables['footer_sticky'] ? ' footer-sticky' : ''; $this->processedData['config']['footer']['class'] = trim($footerClass); - } /** @@ -520,7 +472,6 @@ public function process(ContentObjectRenderer $cObj, array $contentObjectConfigu $this->processedData['config']['expandedcontentBottom']['container'] = $processedRecordVariables['expandedcontent_containerbottom']; $this->processedData['config']['expandedcontentBottom']['containerposition'] = $processedRecordVariables['expandedcontent_containerpositionbottom']; $this->processedData['config']['expandedcontentBottom']['class'] = $processedRecordVariables['expandedcontent_classbottom']; - } if (!$this->processorConfiguration['disableDefaultCss']) { @@ -694,6 +645,7 @@ private function includeRequiredFiles($processedRecordVariables, $webp) { self::writeCustomFile($customPath, $customFileName, $js); } + // include required files to fileadmin if ($css) { $projectCSS = GeneralUtility::makeInstance(FilePathSanitizer::class)->sanitize( @@ -734,7 +686,6 @@ private function writeCustomFile($customPath, $customFileName, $customContent ) $contentLength = strlen(trim($customContent)); if ($customFileLength != $contentLength) { - unlink($customFile); GeneralUtility::writeFile($customFile, trim($customContent)); } @@ -752,5 +703,4 @@ private function writeCustomFile($customPath, $customFileName, $customContent ) } - } diff --git a/Classes/DataProcessing/GalleryProcessor.php b/Classes/DataProcessing/GalleryProcessor.php index c8391b19..28917748 100644 --- a/Classes/DataProcessing/GalleryProcessor.php +++ b/Classes/DataProcessing/GalleryProcessor.php @@ -826,7 +826,8 @@ protected function getPageContainer($pageContainer) || ($this->colPos === -1 && $this->processedData['data']['parentgrid_tx_gridelements_backend_layout'] == 'background_wrapper') ) { - $t3sbconfig = self::getContentRecord($this->getConfigurationValue('configuid'), 'tx_t3sbootstrap_domain_model_config'); + + $t3sbconfig = self::getContentRecord((int)$this->getConfigurationValue('configuid'), 'tx_t3sbootstrap_domain_model_config'); $jumbotronContainer = $t3sbconfig[0]['jumbotron_container']; $footerContainer = $t3sbconfig[0]['footer_container']; diff --git a/Classes/Domain/Model/Config.php b/Classes/Domain/Model/Config.php index fae442fb..649a33d4 100644 --- a/Classes/Domain/Model/Config.php +++ b/Classes/Domain/Model/Config.php @@ -204,7 +204,6 @@ class Config extends AbstractEntity protected $navbarBackground = ''; - /** * navbarShrinkcolorschemes * @@ -578,6 +577,15 @@ class Config extends AbstractEntity */ protected $expandedcontentClassbottom = ''; + + /** + * generalRootline + * + * @var bool + */ + protected $generalRootline = false; + + /** * Returns the pid * @@ -2375,7 +2383,7 @@ public function setExpandedcontentClasstop($expandedcontentClasstop) * * @return bool $expandedcontentEnablebottom */ - public function getexpandedcontentEnablebottom() + public function getExpandedcontentEnablebottom() { return $this->expandedcontentEnablebottom; } @@ -2386,7 +2394,7 @@ public function getexpandedcontentEnablebottom() * @param bool $expandedcontentEnablebottom * @return void */ - public function setexpandedcontentEnablebottom($expandedcontentEnablebottom) + public function setExpandedcontentEnablebottom($expandedcontentEnablebottom) { $this->expandedcontentEnablebottom = $expandedcontentEnablebottom; } @@ -2396,7 +2404,7 @@ public function setexpandedcontentEnablebottom($expandedcontentEnablebottom) * * @return bool */ - public function isexpandedcontentEnablebottom() + public function isExpandedcontentEnablebottom() { return $this->expandedcontentEnablebottom; } @@ -2495,4 +2503,36 @@ public function setExpandedcontentClassbottom($expandedcontentClassbottom) $this->expandedcontentClassbottom = $expandedcontentClassbottom; } + /** + * Returns the generalRootline + * + * @return bool $generalRootline + */ + public function getGeneralRootline() + { + return $this->generalRootline; + } + + /** + * Sets the generalRootline + * + * @param bool $generalRootline + * @return void + */ + public function setGeneralRootline($generalRootline) + { + $this->generalRootline = $generalRootline; + } + + /** + * Returns the boolean state of generalRootline + * + * @return bool + */ + public function isGeneralRootline() + { + return $this->generalRootline; + } + + } diff --git a/Classes/ExpressionLanguage/T3sbConditionFunctionsProvider.php b/Classes/ExpressionLanguage/T3sbConditionFunctionsProvider.php index ee8ebdb5..655fa208 100644 --- a/Classes/ExpressionLanguage/T3sbConditionFunctionsProvider.php +++ b/Classes/ExpressionLanguage/T3sbConditionFunctionsProvider.php @@ -32,7 +32,7 @@ public function getFunctions(): array ]; } - + protected function getExtconf(): ExpressionFunction { return new ExpressionFunction('t3sbootstrap', function ($str) { @@ -66,7 +66,7 @@ protected function getBrowser(): ExpressionFunction return $str === $browser; }); - } + } protected function getColPosList(): ExpressionFunction @@ -76,9 +76,9 @@ protected function getColPosList(): ExpressionFunction }, function ($arguments, $str) { $result = FALSE; - + if ( $_GET['id'] && TYPO3_MODE == 'BE' ) { - + $pid = (int)$_GET['id']; $objectManager = GeneralUtility::makeInstance(ObjectManager::class); $configRepository = $objectManager->get(ConfigRepository::class); @@ -157,7 +157,7 @@ protected function getColPosList(): ExpressionFunction $result = TRUE; } } - + if ( $config->getExpandedcontentEnabletop() && $config->getExpandedcontentEnablebottom() ) { if ($str == 'FooterandTopBottom') { $result = TRUE; @@ -185,7 +185,7 @@ protected function getColPosList(): ExpressionFunction } } } - } + } } return $result; @@ -199,10 +199,10 @@ protected function getExtensionLoaded(): ExpressionFunction return new ExpressionFunction('loaded', function () { // Not implemented, we only use the evaluator }, function ($arguments, $extKey) { + return ExtensionManagementUtility::isLoaded($extKey); }); } - } diff --git a/Classes/Tasks/CdnToLocal.php b/Classes/Tasks/CdnToLocal.php index 2445f8ec..59062afd 100644 --- a/Classes/Tasks/CdnToLocal.php +++ b/Classes/Tasks/CdnToLocal.php @@ -53,17 +53,17 @@ public function execute() { if ($settings['cdn']['bootswatch']) { $bootswatchTheme = $settings['cdn']['bootswatch']; - $cdnPath = 'https://stackpath.bootstrapcdn.com/bootswatch/'.$settings['cdn']['bootstrap'].'/'.$bootswatchTheme.'/bootstrap.min.css'; + $cdnPath = 'https://cdn.jsdelivr.net/npm/bootswatch@'.$settings['cdn']['bootstrap'].'/dist/'.$bootswatchTheme.'/bootstrap.min.css'; self::writeCustomFile($customPath, $customFileName, $cdnPath, true); } else { - $cdnPath = 'https://stackpath.bootstrapcdn.com/bootstrap/'.$settings['cdn']['bootstrap'].'/css/bootstrap.min.css'; + $cdnPath = 'https://cdn.jsdelivr.net/npm/bootstrap@'.$settings['cdn']['bootstrap'].'/dist/css/bootstrap.min.css'; self::writeCustomFile($customPath, $customFileName, $cdnPath, true); } $customDir = 'fileadmin/T3SB/Resources/Public/JS/'; $customPath = GeneralUtility::getFileAbsFileName($customDir); $customFileName = 'bootstrap.min.js'; - $cdnPath = 'https://stackpath.bootstrapcdn.com/bootstrap/'.$version.'/js/bootstrap.min.js'; + $cdnPath = 'https://cdn.jsdelivr.net/npm/bootstrap@'.$version.'/dist/js/bootstrap.min.js'; self::writeCustomFile($customPath, $customFileName, $cdnPath); } diff --git a/Classes/Utility/BackgroundImageUtility.php b/Classes/Utility/BackgroundImageUtility.php index 2831e66c..7aa808db 100644 --- a/Classes/Utility/BackgroundImageUtility.php +++ b/Classes/Utility/BackgroundImageUtility.php @@ -77,9 +77,7 @@ public function getBgImage($uid, $table='tt_content', $jumbotron=FALSE, $bgColor if (!empty($filesFromRepository) ) { $file = $filesFromRepository[0]; $image = $this->imageService()->getImage($file->getOriginalFile()->getUid(), $file->getOriginalFile(), 1); - $uid = $currentUid ?: $uid; - if ( $flexconf['bgimagePosition'] ) { $uid = $uid . '-' . $flexconf['bgimagePosition']; } diff --git a/Classes/ViewHelpers/IncludeFileViewHelper.php b/Classes/ViewHelpers/IncludeFileViewHelper.php index ee94f3e5..7613acf0 100644 --- a/Classes/ViewHelpers/IncludeFileViewHelper.php +++ b/Classes/ViewHelpers/IncludeFileViewHelper.php @@ -21,7 +21,7 @@ * * # Example: Basic example * - * + * * * * This will include the file provided by {settings} in the header diff --git a/Classes/ViewHelpers/SrcsetViewHelper.php b/Classes/ViewHelpers/SrcsetViewHelper.php index 0f3bdeb6..1b628143 100644 --- a/Classes/ViewHelpers/SrcsetViewHelper.php +++ b/Classes/ViewHelpers/SrcsetViewHelper.php @@ -1,5 +1,4 @@ 'check', ] ] + + +/* + + +'sectionmenu' => [ + 'exclude' => 1, + 'label' => 'sectionmenu', + 'config' => [ + 'type' => 'check', + 'default' => 1 + ] +], +'sidebar_right' => [ + 'exclude' => 1, + 'label' => 'sidebar_right', + 'config' => [ + 'type' => 'check', + 'default' => 1 + ] +], +'sidebar' => [ + 'exclude' => 1, + 'label' => 'sidebar', + 'config' => [ + 'type' => 'check', + 'default' => 1 + ] +], +'langmenu' => [ + 'exclude' => 1, + 'label' => 'langmenu', + 'config' => [ + 'type' => 'check', + 'default' => 1 + ] +], +'metamenu' => [ + 'exclude' => 1, + 'label' => 'metamenu', + 'config' => [ + 'type' => 'check', + 'default' => 1 + ] +], + +*/ + ]; \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('pages',$tempPagesColumns); @@ -145,6 +193,9 @@ } + + + $menuheader = 198; // Add new page type: diff --git a/Configuration/TCA/tx_t3sbootstrap_domain_model_config.php b/Configuration/TCA/tx_t3sbootstrap_domain_model_config.php index 6e30095f..6f6a8f36 100644 --- a/Configuration/TCA/tx_t3sbootstrap_domain_model_config.php +++ b/Configuration/TCA/tx_t3sbootstrap_domain_model_config.php @@ -1020,6 +1020,18 @@ 'size' => 20 ] ], + 'general_rootline' => [ + 'exclude' => false, + 'label' => 'Rootline_enable', + 'config' => [ + 'type' => 'check', + 'items' => [ + '1' => [ + '0' => 'LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:labels.enabled' + ] + ] + ] + ], ], ]; diff --git a/Configuration/TypoScript/Content/Content.typoscript b/Configuration/TypoScript/Content/Content.typoscript index 0b9cc403..d82f8140 100644 --- a/Configuration/TypoScript/Content/Content.typoscript +++ b/Configuration/TypoScript/Content/Content.typoscript @@ -52,9 +52,9 @@ lib.content.footerFromPid { select { orderBy = sorting where = colPos=0 - pidInList.data = register:footerpid + pidInList = {$bootstrap.db.footer_pid} } - if.isTrue.data = register:footerpid + if.isTrue = {$bootstrap.db.footer_pid} } # if indexed_search is loaded diff --git a/Configuration/TypoScript/ContentElement/Bootstrap.typoscript b/Configuration/TypoScript/ContentElement/Bootstrap.typoscript index c6c11548..3f063337 100644 --- a/Configuration/TypoScript/ContentElement/Bootstrap.typoscript +++ b/Configuration/TypoScript/ContentElement/Bootstrap.typoscript @@ -29,8 +29,7 @@ tt_content { maxWidthMediaObject = {$bootstrap.image.maxWidthMediaObject} maxWidthToast = {$bootstrap.image.maxWidthToast} overrideSmallColumns = {$pages.override.smallColumns} - configuid.cObject = TEXT - configuid.cObject.data = register:configuid + configuid = {$bootstrap.db.uid} } 223 = T3SBS\T3sbootstrap\DataProcessing\CardProcessor } @@ -73,8 +72,7 @@ tt_content { maxWidthToast = {$bootstrap.image.maxWidthToast} disableAutoRow = {$bootstrap.image.disableAutoRow} overrideSmallColumns = {$pages.override.smallColumns} - configuid.cObject = TEXT - configuid.cObject.data = register:configuid + configuid = {$bootstrap.db.uid} } } } @@ -102,11 +100,10 @@ tt_content { minimumWidth = {$bootstrap.image.minimumWidth} ratioWithHeight = {$bootstrap.image.ratioWithHeight} maxWidthMediaObject = {$bootstrap.image.maxWidthMediaObject} - maxWidthToast = {$bootstrap.image.maxWidthToast} - disableAutoRow = {$bootstrap.image.disableAutoRow} + maxWidthToast = {$bootstrap.image.maxWidthToast} + disableAutoRow = {$bootstrap.image.disableAutoRow} overrideSmallColumns = {$pages.override.smallColumns} - configuid.cObject = TEXT - configuid.cObject.data = register:configuid + configuid = {$bootstrap.db.uid} } } @@ -134,8 +131,7 @@ tt_content { maxWidthToast = {$bootstrap.image.maxWidthToast} disableAutoRow = {$bootstrap.image.disableAutoRow} overrideSmallColumns = {$pages.override.smallColumns} - configuid.cObject = TEXT - configuid.cObject.data = register:configuid + configuid = {$bootstrap.db.uid} } } diff --git a/Configuration/TypoScript/ContentElement/Default.typoscript b/Configuration/TypoScript/ContentElement/Default.typoscript index 278b8ad1..39dac08e 100644 --- a/Configuration/TypoScript/ContentElement/Default.typoscript +++ b/Configuration/TypoScript/ContentElement/Default.typoscript @@ -19,8 +19,7 @@ tt_content { maxWidthToast = {$bootstrap.image.maxWidthToast} disableAutoRow = {$bootstrap.image.disableAutoRow} overrideSmallColumns = {$pages.override.smallColumns} - configuid.cObject = TEXT - configuid.cObject.data = register:configuid + configuid = {$bootstrap.db.uid} } } } @@ -40,8 +39,7 @@ tt_content { maxWidthToast = {$bootstrap.image.maxWidthToast} disableAutoRow = {$bootstrap.image.disableAutoRow} overrideSmallColumns = {$pages.override.smallColumns} - configuid.cObject = TEXT - configuid.cObject.data = register:configuid + configuid = {$bootstrap.db.uid} } } } @@ -61,8 +59,7 @@ tt_content { maxWidthToast = {$bootstrap.image.maxWidthToast} disableAutoRow = {$bootstrap.image.disableAutoRow} overrideSmallColumns = {$pages.override.smallColumns} - configuid.cObject = TEXT - configuid.cObject.data = register:configuid + configuid = {$bootstrap.db.uid} } } } @@ -115,21 +112,6 @@ tt_content { } variables < page.10.variables settings < page.10.settings - dataProcessing { - 224 = T3SBS\T3sbootstrap\DataProcessing\BootstrapProcessor - 224 { - container = {$bootstrap.extconf.container} - cType = {$bootstrap.extconf.cTypeClass} - sectionmenu = TEXT - sectionmenu.data.dataWrap = DB:tx_t3sbootstrap_domain_model_config:{register:configuid}:navbar_sectionmenu - sidebarleft = TEXT - sidebarleft.data.dataWrap = DB:tx_t3sbootstrap_domain_model_config:{register:configuid}:sidebar_enable - sidebarright = TEXT - sidebarright.data.dataWrap = DB:tx_t3sbootstrap_domain_model_config:{register:configuid}:sidebar_rightenable - configuid.cObject = TEXT - configuid.cObject.data = register:configuid - } - } } } diff --git a/Configuration/TypoScript/Lib/ContentElement.typoscript b/Configuration/TypoScript/Lib/ContentElement.typoscript index 17756522..ab094da2 100644 --- a/Configuration/TypoScript/Lib/ContentElement.typoscript +++ b/Configuration/TypoScript/Lib/ContentElement.typoscript @@ -83,8 +83,7 @@ lib.contentElement { defaultHeaderType = {$styles.content.defaultHeaderType} contentMarginTop = {$bootstrap.config.contentMarginTop} webp = {$bootstrap.extconf.webp} - configuid.cObject = TEXT - configuid.cObject.data = register:configuid + configuid = {$bootstrap.db.uid} } } } diff --git a/Configuration/TypoScript/Page/BodyTag.typoscript b/Configuration/TypoScript/Page/BodyTag.typoscript index f3a30723..2da952e6 100644 --- a/Configuration/TypoScript/Page/BodyTag.typoscript +++ b/Configuration/TypoScript/Page/BodyTag.typoscript @@ -35,7 +35,7 @@ page { } 50 = TEXT 50 { - data = register:breakpoint + value = {$bootstrap.db.navbar_breakpoint} noTrimWrap = | || } @@ -44,15 +44,12 @@ page { 30 { stdWrap.noTrimWrap = | style="|"| 10 = TEXT - 10.data.dataWrap = DB:tx_t3sbootstrap_domain_model_config:{register:configuid}:navbar_height + 10.value = {$bootstrap.db.navbar_height} 10.wrap = padding-top:|px; - if { - isTrue.cObject = TEXT - isTrue.cObject.data.dataWrap = DB:tx_t3sbootstrap_domain_model_config:{register:configuid}:navbar_height - } + if.isTrue = {$bootstrap.db.navbar_height} } 40 = TEXT - 40.data = register:breakpoint + 40.value = {$bootstrap.db.navbar_breakpoint} 40.noTrimWrap = | data-navbar-breakpoint="|"| } } diff --git a/Configuration/TypoScript/Page/IncludeBootstrapCss.typoscript b/Configuration/TypoScript/Page/IncludeBootstrapCss.typoscript index d87e0cd7..9b3b71d2 100644 --- a/Configuration/TypoScript/Page/IncludeBootstrapCss.typoscript +++ b/Configuration/TypoScript/Page/IncludeBootstrapCss.typoscript @@ -15,7 +15,7 @@ page { } # CDN - bootstrapCDN = https://stackpath.bootstrapcdn.com/bootstrap/{$bootstrap.cdn.bootstrap}/css/bootstrap.min.css + bootstrapCDN = https://cdn.jsdelivr.net/npm/bootstrap@{$bootstrap.cdn.bootstrap}/dist/css/bootstrap.min.css bootstrapCDN.external = 1 bootstrapCDN.integrity = {$bootstrap.cdn.bootstrapCssIntegrity} bootstrapCDN.forceOnTop = 1 @@ -32,7 +32,7 @@ page { ########################################################################################################## # CDN - bootswatchCDN = https://stackpath.bootstrapcdn.com/bootswatch/{$bootstrap.cdn.bootstrap}/{$bootstrap.cdn.bootswatch}/bootstrap.min.css + bootswatchCDN = https://cdn.jsdelivr.net/npm/bootswatch@{$bootstrap.cdn.bootstrap}/dist/{$bootstrap.cdn.bootswatch}/bootstrap.min.css bootswatchCDN.external = 1 bootswatchCDN.forceOnTop = 1 bootswatchCDN.if { diff --git a/Configuration/TypoScript/Page/IncludeCdn.typoscript b/Configuration/TypoScript/Page/IncludeCdn.typoscript index 681c4367..023ca18b 100644 --- a/Configuration/TypoScript/Page/IncludeCdn.typoscript +++ b/Configuration/TypoScript/Page/IncludeCdn.typoscript @@ -74,7 +74,8 @@ page { popperCDN.integrity = {$bootstrap.cdn.popperjsIntegrity} popperCDN.external = 1 - bootstrapCDN = https://stackpath.bootstrapcdn.com/bootstrap/{$bootstrap.cdn.bootstrap}/js/bootstrap.min.js + + bootstrapCDN = https://cdn.jsdelivr.net/npm/bootstrap@{$bootstrap.cdn.bootstrap}/dist/js/bootstrap.min.js bootstrapCDN.integrity = {$bootstrap.cdn.bootstrapJsIntegrity} bootstrapCDN.external = 1 diff --git a/Configuration/TypoScript/Page/JS/InlineJS.typoscript b/Configuration/TypoScript/Page/JS/InlineJS.typoscript index 5241d337..f0dd2cb3 100644 --- a/Configuration/TypoScript/Page/JS/InlineJS.typoscript +++ b/Configuration/TypoScript/Page/JS/InlineJS.typoscript @@ -184,10 +184,8 @@ temp.jsFooterInline { ) -6.if { - isFalse.cObject = TEXT - isFalse.cObject.data.dataWrap = DB:tx_t3sbootstrap_domain_model_config:{register:configuid}:navbar_sectionmenu -} +6.if.isFalse = {$bootstrap.db.navbar_sectionmenu} + 7 = TEXT 7.value ( @@ -221,10 +219,7 @@ temp.jsFooterInline { ) -7.if { - isTrue.cObject = TEXT - isTrue.cObject.data.dataWrap = DB:tx_t3sbootstrap_domain_model_config:{register:configuid}:navbar_sectionmenu -} +7.if.isTrue = {$bootstrap.db.navbar_sectionmenu} 8 = TEXT @@ -250,6 +245,7 @@ temp.jsFooterInline { ) 8.if.isTrue.data = page:tx_t3sbootstrap_linkToTop + 9 = TEXT 9.value ( @@ -267,10 +263,8 @@ temp.jsFooterInline { ) -9.if { - isTrue.cObject = TEXT - isTrue.cObject.data.dataWrap = DB:tx_t3sbootstrap_domain_model_config:{register:configuid}:footer_sticky -} +9.if.isTrue = {$bootstrap.db.footer_sticky} + 10 = TEXT 10.value ( @@ -321,10 +315,8 @@ temp.jsFooterInline { ) -11.if { - isTrue.cObject = TEXT - isTrue.cObject.data.dataWrap = DB:tx_t3sbootstrap_domain_model_config:{register:configuid}:navbar_megamenu -} +11.if.isTrue = {$bootstrap.db.navbar_megamenu} + 12 = TEXT 12.value ( @@ -386,7 +378,7 @@ temp.jsFooterInline { ) 13.if { - value.data.dataWrap = DB:tx_t3sbootstrap_domain_model_config:{register:configuid}:navbar_placement + value = {$bootstrap.db.navbar_placement} equals = sticky-top } @@ -395,13 +387,12 @@ temp.jsFooterInline { // sectionmenu animated scrolling and scrollspy - page.jsFooterInline.5.14 - Animated scrolling $("#sectionmenu .section-menu a.scroll-trigger").bind("click", function(event) { + event.preventDefault(); var anchor = $(this).attr("href"); anchor = anchor.split('#'); anchor = "#"+anchor[1]; if (anchor.length) { - - var sectionmenuHeight = 0; //var sectionmenuRow = $("#sectionmenu").find("nav").hasClass("flex-row-reverse"); var sectionmenuRow = $("#sectionmenu").find("nav").hasClass("flex-row"); @@ -444,7 +435,36 @@ temp.jsFooterInline { offset: {$bootstrap.config.sectionmenuScrollspyOffset} }); ) -14.if.isTrue = {$bootstrap.config.sectionmenuScrolling} +14.if { + isTrue.cObject = COA + isTrue.cObject { + 10 = TEXT + 10.value = 1 + 10.if { + equals = Section + value = {$bootstrap.db.sidebar_enable} + } + 20 = TEXT + 20.value = 1 + 20.if { + equals = Section + value = {$bootstrap.db.sidebar_rightenable} + } + 30 = TEXT + 30.value = 1 + 30.if { + equals = Section + value = {$bootstrap.config.sidebar_rightenable} + } + 40 = TEXT + 40.value = 1 + 40.if { + equals = Section + value = {$bootstrap.config.sidebar_enable} + } + } +} + 15 = TEXT 15.value ( @@ -618,73 +638,74 @@ temp.jsFooterInline { ) -50.if { - isTrue.cObject = TEXT - isTrue.cObject.data.dataWrap = DB:tx_t3sbootstrap_domain_model_config:{register:configuid}:navbar_hover -} +50.if.isTrue = {$bootstrap.db.navbar_hover} + 51 = TEXT 51.value ( // Navbar hover - page.jsFooterInline.5.51 - sm - if ( $(window).width() > {$bootstrap.navbar.breakpoint.sm}-1 ) { + if ( $(window).width() > {$bootstrap.navbar.breakpoint.sm} ) { navbarHover(); } ) 51.if { - isTrue.cObject = TEXT - isTrue.cObject.data.dataWrap = DB:tx_t3sbootstrap_domain_model_config:{register:configuid}:navbar_hover - value.data = register:breakpoint + isTrue = {$bootstrap.db.navbar_hover} + value = {$bootstrap.db.navbar_breakpoint} equals = sm } + + 52 = TEXT 52.value ( // Navbar hover - page.jsFooterInline.5.52 - md - if ( $(window).width() > {$bootstrap.navbar.breakpoint.md}-1 ) { + if ( $(window).width() > {$bootstrap.navbar.breakpoint.md} ) { navbarHover(); } ) 52.if { - isTrue.cObject = TEXT - isTrue.cObject.data.dataWrap = DB:tx_t3sbootstrap_domain_model_config:{register:configuid}:navbar_hover - value.data = register:breakpoint + isTrue = {$bootstrap.db.navbar_hover} + value = {$bootstrap.db.navbar_breakpoint} equals = md } 53 = TEXT 53.value ( // Navbar hover - page.jsFooterInline.5.53 - lg - if ( $(window).width() > {$bootstrap.navbar.breakpoint.lg}-1 ) { + if ( $(window).width() > {$bootstrap.navbar.breakpoint.lg} ) { navbarHover(); } ) 53.if { - isTrue.cObject = TEXT - isTrue.cObject.data.dataWrap = DB:tx_t3sbootstrap_domain_model_config:{register:configuid}:navbar_hover - value.data = register:breakpoint + isTrue = {$bootstrap.db.navbar_hover} + value = {$bootstrap.db.navbar_breakpoint} equals = lg } + + + + + 54 = TEXT 54.value ( // Navbar hover - page.jsFooterInline.5.54 - xl - if ( $(window).width() > {$bootstrap.navbar.breakpoint.xl}-1 ) { + if ( $(window).width() > {$bootstrap.navbar.breakpoint.xl} ) { navbarHover(); } ) 54.if { - isTrue.cObject = TEXT - isTrue.cObject.data.dataWrap = DB:tx_t3sbootstrap_domain_model_config:{register:configuid}:navbar_hover - value.data = register:breakpoint + isTrue = {$bootstrap.db.navbar_hover} + value = {$bootstrap.db.navbar_breakpoint} equals = xl } @@ -697,9 +718,8 @@ temp.jsFooterInline { ) 55.if { - isTrue.cObject = TEXT - isTrue.cObject.data.dataWrap = DB:tx_t3sbootstrap_domain_model_config:{register:configuid}:navbar_hover - value.data = register:breakpoint + isTrue = {$bootstrap.db.navbar_hover} + value = {$bootstrap.db.navbar_breakpoint} equals = no } @@ -735,12 +755,9 @@ temp.jsFooterInline { }); - ) -60.if { - isTrue.cObject = TEXT - isTrue.cObject.data.dataWrap = DB:tx_t3sbootstrap_domain_model_config:{register:configuid}:navbar_clickableparent -} +60.if.isTrue = {$bootstrap.db.navbar_clickableparent} + 61 = TEXT @@ -764,10 +781,7 @@ temp.jsFooterInline { ) -61.if { - isTrue.cObject = TEXT - isTrue.cObject.data.dataWrap = DB:tx_t3sbootstrap_domain_model_config:{register:configuid}:navbar_shrinkcolor -} +61.if.isTrue = {$bootstrap.db.navbar_shrinkcolor} @@ -782,8 +796,7 @@ temp.jsFooterInline { ) 70.if { - isTrue.cObject = TEXT - isTrue.cObject.data.dataWrap = DB:tx_t3sbootstrap_domain_model_config:{register:configuid}:navbar_offcanvas + isTrue = {$bootstrap.db.navbar_offcanvas} } 71 = TEXT 71.value ( @@ -795,9 +808,8 @@ temp.jsFooterInline { ) 71.if { - isTrue.cObject = TEXT - isTrue.cObject.data.dataWrap = DB:tx_t3sbootstrap_domain_model_config:{register:configuid}:navbar_offcanvas - value.data = register:breakpoint + isTrue = {$bootstrap.db.navbar_offcanvas} + value = {$bootstrap.db.navbar_breakpoint} equals = sm } 72 = TEXT @@ -810,9 +822,8 @@ temp.jsFooterInline { ) 72.if { - isTrue.cObject = TEXT - isTrue.cObject.data.dataWrap = DB:tx_t3sbootstrap_domain_model_config:{register:configuid}:navbar_offcanvas - value.data = register:breakpoint + isTrue = {$bootstrap.db.navbar_offcanvas} + value = {$bootstrap.db.navbar_breakpoint} equals = md } 73 = TEXT @@ -825,9 +836,8 @@ temp.jsFooterInline { ) 73.if { - isTrue.cObject = TEXT - isTrue.cObject.data.dataWrap = DB:tx_t3sbootstrap_domain_model_config:{register:configuid}:navbar_offcanvas - value.data = register:breakpoint + isTrue = {$bootstrap.db.navbar_offcanvas} + value = {$bootstrap.db.navbar_breakpoint} equals = lg } 74 = TEXT @@ -840,9 +850,8 @@ temp.jsFooterInline { ) 74.if { - isTrue.cObject = TEXT - isTrue.cObject.data.dataWrap = DB:tx_t3sbootstrap_domain_model_config:{register:configuid}:navbar_offcanvas - value.data = register:breakpoint + isTrue = {$bootstrap.db.navbar_offcanvas} + value = {$bootstrap.db.navbar_breakpoint} equals = xl } 75 = TEXT @@ -853,9 +862,8 @@ temp.jsFooterInline { ) 75.if { - isTrue.cObject = TEXT - isTrue.cObject.data.dataWrap = DB:tx_t3sbootstrap_domain_model_config:{register:configuid}:navbar_offcanvas - value.data = register:breakpoint + isTrue = {$bootstrap.db.navbar_offcanvas} + value = {$bootstrap.db.navbar_breakpoint} equals = no } @@ -878,9 +886,8 @@ temp.jsFooterInline { ) 151.if { - isTrue.cObject = TEXT - isTrue.cObject.data.dataWrap = DB:tx_t3sbootstrap_domain_model_config:{register:configuid}:navbar_megamenu - value.data = register:breakpoint + isTrue = {$bootstrap.db.navbar_megamenu} + value = {$bootstrap.db.navbar_breakpoint} equals = sm } @@ -896,9 +903,8 @@ temp.jsFooterInline { ) 152.if { - isTrue.cObject = TEXT - isTrue.cObject.data.dataWrap = DB:tx_t3sbootstrap_domain_model_config:{register:configuid}:navbar_megamenu - value.data = register:breakpoint + isTrue = {$bootstrap.db.navbar_megamenu} + value = {$bootstrap.db.navbar_breakpoint} equals = md } @@ -914,9 +920,8 @@ temp.jsFooterInline { ) 153.if { - isTrue.cObject = TEXT - isTrue.cObject.data.dataWrap = DB:tx_t3sbootstrap_domain_model_config:{register:configuid}:navbar_megamenu - value.data = register:breakpoint + isTrue = {$bootstrap.db.navbar_megamenu} + value = {$bootstrap.db.navbar_breakpoint} equals = lg } @@ -932,9 +937,8 @@ temp.jsFooterInline { ) 154.if { - isTrue.cObject = TEXT - isTrue.cObject.data.dataWrap = DB:tx_t3sbootstrap_domain_model_config:{register:configuid}:navbar_megamenu - value.data = register:breakpoint + isTrue = {$bootstrap.db.navbar_megamenu} + value = {$bootstrap.db.navbar_breakpoint} equals = xl } diff --git a/Configuration/TypoScript/Page/Print.typoscript b/Configuration/TypoScript/Page/Print.typoscript index 7958b93b..5f64478b 100644 --- a/Configuration/TypoScript/Page/Print.typoscript +++ b/Configuration/TypoScript/Page/Print.typoscript @@ -103,17 +103,7 @@ print { dataProcessing.90 = T3SBS\T3sbootstrap\DataProcessing\ConfigProcessor dataProcessing.90 { navbarExtraRow = {$bootstrap.navbar.extraRow} - rootline = {$bootstrap.config.rootline} - dataProcessing { - 10 = TYPO3\CMS\Frontend\DataProcessing\FilesProcessor - 10 { - references { - table = pages - fieldName = media - } - as = pagemedia - } - } + rootline = {$bootstrap.db.general_rootline} } } } diff --git a/Configuration/TypoScript/Page/Register.typoscript b/Configuration/TypoScript/Page/Register.typoscript index 76727467..e55aa0ed 100644 --- a/Configuration/TypoScript/Page/Register.typoscript +++ b/Configuration/TypoScript/Page/Register.typoscript @@ -1,55 +1,18 @@ -page { - 1 = LOAD_REGISTER - 1.homepageuid.cObject = TEXT - 1.homepageuid.cObject.data = LEVELFIELD:0,uid,slide - 1.homepageuid.intval = 1 - - 1.currentuid.cObject = CONTENT - 1.currentuid.cObject { - table = tx_t3sbootstrap_domain_model_config - select.pidInList.data = page:uid - renderObj = TEXT - renderObj.field = uid - slide = -1 - slide.if.isTrue = {$bootstrap.config.rootline} - } - 1.currentuid.intval = 1 - - 1.configuid.cObject = COA - 1.configuid.cObject { - 10 = TEXT - 10 { - data = register:homepageuid - if.isFalse.data = register:currentuid - } - 20 = TEXT - 20 { - data = register:currentuid - if.isTrue.data = register:currentuid - } - } - 1.configuid.intval = 1 - - 1.breakpoint.cObject = TEXT - 1.breakpoint.cObject.data.dataWrap = DB:tx_t3sbootstrap_domain_model_config:{register:configuid}:navbar_breakpoint - - 1.footerpid.cObject = TEXT - 1.footerpid.cObject.data.dataWrap = DB:tx_t3sbootstrap_domain_model_config:{register:configuid}:footer_pid - 1.footerpid.intval = 1 - +[{$bootstrap.ext.news} == 1] +page.1 = LOAD_REGISTER +page.1.newsTitle.cObject = RECORDS +page.1.newsTitle.cObject { + source = {GP:tx_news_pi1|news} + source.insertData = 1 + tables = tx_news_domain_model_news + conf.tx_news_domain_model_news > + conf.tx_news_domain_model_news = TEXT + conf.tx_news_domain_model_news.field = title +} +[END] - 1.newsTitle.cObject = RECORDS - 1.newsTitle.cObject { - source = {GP:tx_news_pi1|news} - source.insertData = 1 - tables = tx_news_domain_model_news - conf.tx_news_domain_model_news > - conf.tx_news_domain_model_news = TEXT - conf.tx_news_domain_model_news.field = title - } -} /* page.20 = COA diff --git a/Configuration/TypoScript/Page/Template.typoscript b/Configuration/TypoScript/Page/Template.typoscript index 76983e5a..33ba6bf9 100644 --- a/Configuration/TypoScript/Page/Template.typoscript +++ b/Configuration/TypoScript/Page/Template.typoscript @@ -75,29 +75,121 @@ page { backToTopClass = {$bootstrap.backToTopClass} backToTopForAllPages = {$bootstrap.backToTopForAllPages} langMenuWithFaIcon = {$bootstrap.config.langMenuWithFaIcon} + + db { + uid = {$bootstrap.db.uid} + company = {$bootstrap.db.company} + homepage_uid = {$bootstrap.db.homepage_uid} + page_title = {$bootstrap.db.page_title} + page_titlealign = {$bootstrap.db.page_titlealign} + page_titlecontainer = {$bootstrap.db.page_titlecontainer} + page_titleclass = {$bootstrap.db.page_titleclass} + meta_enable = {$bootstrap.db.meta_enable} + meta_value = {$bootstrap.db.meta_value} + meta_container = {$bootstrap.db.meta_container} + meta_class = {$bootstrap.db.meta_class} + meta_text = {$bootstrap.db.meta_text} + navbar_enable = {$bootstrap.db.navbar_enable} + navbar_entrylevel = {$bootstrap.db.navbar_entrylevel} + navbar_levels = {$bootstrap.db.navbar_levels} + navbar_excludeuiduist = {$bootstrap.db.navbar_excludeuiduist} + navbar_includespacer = {$bootstrap.db.navbar_includespacer} + navbar_justify = {$bootstrap.db.navbar_justify} + navbar_sectionmenu = {$bootstrap.db.navbar_sectionmenu} + navbar_megamenu = {$bootstrap.db.navbar_megamenu} + navbar_hover = {$bootstrap.db.navbar_hover} + navbar_clickableparent = {$bootstrap.db.navbar_clickableparent} + navbar_brand = {$bootstrap.db.navbar_brand} + navbar_image = {$bootstrap.db.navbar_image} + navbar_color = {$bootstrap.db.navbar_color} + navbar_background = {$bootstrap.db.navbar_background} + navbar_container = {$bootstrap.db.navbar_container} + navbar_placement = {$bootstrap.db.navbar_placement} + navbar_alignment = {$bootstrap.db.navbar_alignment} + navbar_class = {$bootstrap.db.navbar_class} + navbar_toggler = {$bootstrap.db.navbar_toggler} + navbar_breakpoint = {$bootstrap.db.navbar_breakpoint} + navbar_offcanvas = {$bootstrap.db.navbar_offcanvas} + navbar_height = {$bootstrap.db.navbar_height} + navbar_searchbox = {$bootstrap.db.navbar_searchbox} + navbar_langmenu = {$bootstrap.db.navbar_langmenu} + navbar_shrinkcolorschemes = {$bootstrap.db.navbar_shrinkcolorschemes} + navbar_shrinkcolor = {$bootstrap.db.navbar_shrinkcolor} + jumbotron_enable = {$bootstrap.db.jumbotron_enable} + jumbotron_bgimage = {$bootstrap.db.jumbotron_bgimage} + jumbotron_fluid = {$bootstrap.db.jumbotron_fluid} + jumbotron_slide = {$bootstrap.db.jumbotron_slide} + jumbotron_position = {$bootstrap.db.jumbotron_position} + jumbotron_container = {$bootstrap.db.jumbotron_container} + jumbotron_containerposition = {$bootstrap.db.jumbotron_containerposition} + jumbotron_class = {$bootstrap.db.jumbotron_class} + breadcrumb_enable = {$bootstrap.db.breadcrumb_enable} + breadcrumb_notonrootpage = {$bootstrap.db.breadcrumb_notonrootpage} + breadcrumb_faicon = {$bootstrap.db.breadcrumb_faicon} + breadcrumb_corner = {$bootstrap.db.breadcrumb_corner} + breadcrumb_bottom = {$bootstrap.db.breadcrumb_bottom} + breadcrumb_position = {$bootstrap.db.breadcrumb_position} + breadcrumb_container = {$bootstrap.db.breadcrumb_container} + breadcrumb_containerposition = {$bootstrap.db.breadcrumb_containerposition} + breadcrumb_class = {$bootstrap.db.breadcrumb_class} + sidebar_enable = {$bootstrap.db.sidebar_enable} + sidebar_rightenable = {$bootstrap.db.sidebar_rightenable} + sidebar_levels = {$bootstrap.db.sidebar_levels} + sidebar_entrylevel = {$bootstrap.db.sidebar_entrylevel} + sidebar_excludeuiduist = {$bootstrap.db.sidebar_excludeuiduist} + sidebar_includespacer = {$bootstrap.db.sidebar_includespacer} + footer_enable = {$bootstrap.db.footer_enable} + footer_fluid = {$bootstrap.db.footer_fluid} + footer_slide = {$bootstrap.db.footer_slide} + footer_sticky = {$bootstrap.db.footer_sticky} + footer_container = {$bootstrap.db.footer_container} + footer_containerposition = {$bootstrap.db.footer_containerposition} + footer_class = {$bootstrap.db.footer_class} + footer_pid = {$bootstrap.db.footer_pid} + expandedcontent_enabletop = {$bootstrap.db.expandedcontent_enabletop} + expandedcontent_slidetop = {$bootstrap.db.expandedcontent_slidetop} + expandedcontent_containerpositiontop = {$bootstrap.db.expandedcontent_containerpositiontop} + expandedcontent_containertop = {$bootstrap.db.expandedcontent_containertop} + expandedcontent_classtop = {$bootstrap.db.expandedcontent_classtop} + expandedcontent_enablebottom = {$bootstrap.db.expandedcontent_enablebottom} + expandedcontent_slidebottom = {$bootstrap.db.expandedcontent_slidebottom} + expandedcontent_containerpositionbottom = {$bootstrap.db.expandedcontent_containerpositionbottom} + expandedcontent_containerbottom = {$bootstrap.db.expandedcontent_containerbottom} + expandedcontent_classbottom = {$bootstrap.db.expandedcontent_classbottom} + general_rootline = {$bootstrap.db.general_rootline} + } + } dataProcessing { + # # NavBar / Main Navigation # 10 = TYPO3\CMS\Frontend\DataProcessing\MenuProcessor 10 { entryLevel.cObject = TEXT - entryLevel.cObject.data.dataWrap = DB:tx_t3sbootstrap_domain_model_config:{register:configuid}:navbar_entrylevel + entryLevel.cObject.value = {$bootstrap.db.navbar_entrylevel} + entryLevel.cObject.override = {$bootstrap.config.navbar_entrylevel} + entryLevel.cObject.override.if.isTrue = {$bootstrap.config.navbar_entrylevel} + levels.cObject = TEXT - levels.cObject.data.dataWrap = DB:tx_t3sbootstrap_domain_model_config:{register:configuid}:navbar_levels - levels.cObject.stdWrap.override = {$bootstrap.config.navbar_levels} - levels.cObject.stdWrap.override.if.isTrue = {$bootstrap.config.navbar_levels} + levels.cObject.value = {$bootstrap.db.navbar_levels} + levels.cObject.override = {$bootstrap.config.navbar_levels} + levels.cObject.override.if.isTrue = {$bootstrap.config.navbar_levels} + excludeUidList.cObject = TEXT - excludeUidList.cObject.data.dataWrap = DB:tx_t3sbootstrap_domain_model_config:{register:configuid}:navbar_excludeuiduist - excludeUidList.cObject.stdWrap.override = {$bootstrap.config.navbar_excludeuiduist} - excludeUidList.cObject.stdWrap.override.if.isTrue = {$bootstrap.config.navbar_excludeuiduist} + excludeUidList.cObject.value = {$bootstrap.db.navbar_excludeuiduist} + excludeUidList.cObject.override = {$bootstrap.config.navbar_excludeuiduist} + excludeUidList.cObject.override.if.isTrue = {$bootstrap.config.navbar_excludeuiduist} + includeSpacer.cObject = TEXT - includeSpacer.cObject.data.dataWrap = DB:tx_t3sbootstrap_domain_model_config:{register:configuid}:navbar_includespacer - includeSpacer.cObject.stdWrap.override = {$bootstrap.config.navbar_includespacer} - includeSpacer.cObject.stdWrap.override.if.isTrue = {$bootstrap.config.navbar_includespacer} + includeSpacer.cObject.value = {$bootstrap.db.navbar_includespacer} + includeSpacer.cObject.override = {$bootstrap.config.navbar_includespacer} + includeSpacer.cObject.override.if.isTrue = {$bootstrap.config.navbar_includespacer} + as = navbarMenu } + 10.if.isFalse.value = {$bootstrap.db.navbar_sectionmenu} # # NavBar-RIGHT / Main Navigation @@ -107,8 +199,8 @@ page { special = list special.value = {$bootstrap.navbar.rightMenuUidList} as = navbarMenuRight - if.isTrue = {$bootstrap.navbar.rightMenuUidList} } + 11.if.isTrue = {$bootstrap.navbar.rightMenuUidList} # # Pagebrowser @@ -120,8 +212,9 @@ page { special.items.prevnextToSection = {$bootstrap.pagebrowser.prevnextToSection} entryLevel = {$bootstrap.pagebrowser.entryLevel} as = browseNext - if.isTrue = {$bootstrap.pagebrowser.enable} } + 12.if.isTrue = {$bootstrap.pagebrowser.enable} + 13 = TYPO3\CMS\Frontend\DataProcessing\MenuProcessor 13 { special = browse @@ -129,8 +222,8 @@ page { special.items.prevnextToSection = {$bootstrap.pagebrowser.prevnextToSection} entryLevel = {$bootstrap.pagebrowser.entryLevel} as = browsePrev - if.isTrue = {$bootstrap.pagebrowser.enable} } + 13.if.isTrue = {$bootstrap.pagebrowser.enable} # # Sub Navigation in Sidebar @@ -139,37 +232,53 @@ page { 20 { entryLevel.cObject = TEXT entryLevel.cObject { - data.dataWrap = DB:tx_t3sbootstrap_domain_model_config:{register:configuid}:sidebar_entrylevel + value = {$bootstrap.db.sidebar_entrylevel} override = -1 override.if { - equals = 99 - value.data.dataWrap = DB:tx_t3sbootstrap_domain_model_config:{register:configuid}:sidebar_entrylevel + equals = 99 + value = {$bootstrap.db.sidebar_entrylevel} } } levels.cObject = TEXT - levels.cObject.data.dataWrap = DB:tx_t3sbootstrap_domain_model_config:{register:configuid}:sidebar_levels - levels.cObject.stdWrap.override = {$bootstrap.config.sidebar_levels} - levels.cObject.stdWrap.override.if.isTrue = {$bootstrap.config.sidebar_levels} + levels.cObject.value = {$bootstrap.db.sidebar_levels} + levels.cObject.override = {$bootstrap.config.sidebar_levels} + levels.cObject.override.if.isTrue = {$bootstrap.config.sidebar_levels} excludeUidList.cObject = TEXT - excludeUidList.cObject.data.dataWrap = DB:tx_t3sbootstrap_domain_model_config:{register:configuid}:sidebar_excludeuiduist - excludeUidList.cObject.stdWrap.override = {$bootstrap.config.sidebar_excludeuiduist} - excludeUidList.cObject.stdWrap.override.if.isTrue = {$bootstrap.config.sidebar_excludeuiduist} + excludeUidList.cObject.value = {$bootstrap.db.sidebar_excludeuiduist} + excludeUidList.cObject.override = {$bootstrap.config.sidebar_excludeuiduist} + excludeUidList.cObject.override.if.isTrue = {$bootstrap.config.sidebar_excludeuiduist} includeSpacer.cObject = TEXT - includeSpacer.cObject.data.dataWrap = DB:tx_t3sbootstrap_domain_model_config:{register:configuid}:sidebar_includespacer - includeSpacer.cObject.stdWrap.override = {$bootstrap.config.sidebar_includespacer} - includeSpacer.cObject.stdWrap.override.if.isTrue = {$bootstrap.config.sidebar_includespacer} + includeSpacer.cObject.value = {$bootstrap.db.sidebar_includespacer} + includeSpacer.cObject.override = {$bootstrap.config.sidebar_includespacer} + includeSpacer.cObject.override.if.isTrue = {$bootstrap.config.sidebar_includespacer} as = subNavigation - if { - isTrue.cObject = COA - isTrue.cObject { - 10 = TEXT - 10.data.dataWrap = DB:tx_t3sbootstrap_domain_model_config:{register:configuid}:sidebar_enable - 20 = TEXT - 20.data.dataWrap = DB:tx_t3sbootstrap_domain_model_config:{register:configuid}:sidebar_rightenable - 30 = TEXT - 30.value = {$bootstrap.config.sidebar_enable} - 40 = TEXT - 40.value = {$bootstrap.config.sidebar_rightenable} + } + 20.if { + isTrue.cObject = COA + isTrue.cObject { + 10 = TEXT + 10.value = 1 + 10.if { + equals = Sub + value = {$bootstrap.db.sidebar_enable} + } + 20 = TEXT + 20.value = 1 + 20.if { + equals = Sub + value = {$bootstrap.db.sidebar_rightenable} + } + 30 = TEXT + 30.value = 1 + 30.if { + equals = Sub + value = {$bootstrap.config.sidebar_rightenable} + } + 40 = TEXT + 40.value = 1 + 40.if { + equals = Sub + value = {$bootstrap.config.sidebar_enable} } } } @@ -183,6 +292,8 @@ page { special.range = 0|-1 as = breadcrumb } + 30.if.isTrue = {$bootstrap.db.breadcrumb_enable} + # # Language Navigation @@ -191,14 +302,9 @@ page { 40 { languages = auto as = languageNavigation - if { - isTrue.cObject = COA - isTrue.cObject { - 10 = TEXT - 10.data.dataWrap = DB:tx_t3sbootstrap_domain_model_config:{register:configuid}:navbar_langmenu - } - } + } + 40.if.isTrue = {$bootstrap.db.navbar_langmenu} # # Meta Navigation @@ -207,21 +313,22 @@ page { 50 { special = list special.value.cObject = TEXT - special.value.cObject.data.dataWrap = DB:tx_t3sbootstrap_domain_model_config:{register:configuid}:meta_value - special.value.cObject.stdWrap.override = {$bootstrap.config.meta_value} - special.value.cObject.stdWrap.override.if.isTrue = {$bootstrap.config.meta_value} - excludeUidList = {register:homepageuid} - excludeUidList.insertData = 1 + special.value.cObject.value = {$bootstrap.db.meta_value} + special.value.cObject.override = {$bootstrap.config.meta_value} + special.value.cObject.override.if.isTrue = {$bootstrap.config.meta_value} + excludeUidList.cObject = TEXT + excludeUidList.cObject.value = {$bootstrap.db.homepage_uid} levels = 1 as = metaNavigation - if { - isTrue.cObject = COA - isTrue.cObject { - 10 = TEXT - 10.data.dataWrap = DB:tx_t3sbootstrap_domain_model_config:{register:configuid}:meta_enable - 20 = TEXT - 20.value = {$bootstrap.config.meta_enable} - } + + } + 50.if { + isTrue.cObject = COA + isTrue.cObject { + 10 = TEXT + 10.value = {$bootstrap.db.meta_enable} + 20 = TEXT + 20.value = {$bootstrap.config.meta_enable} } } @@ -267,28 +374,46 @@ page { pidInList.field = pid #where = sectionIndex = 1 AND ( colPos = 0 OR colPos = -1 ) where = sectionIndex = 1 AND ( colPos = -1 ) - #insertData = 1 orderBy = sorting as = gridcontent } } } } - if { - isTrue.cObject = COA - isTrue.cObject { - 10 = TEXT - 10.data.dataWrap = DB:tx_t3sbootstrap_domain_model_config:{register:configuid}:navbar_sectionmenu - 20 = TEXT - 20.data.dataWrap = DB:tx_t3sbootstrap_domain_model_config:{register:configuid}:sidebar_rightenable - 30 = TEXT - 30.data.dataWrap = DB:tx_t3sbootstrap_domain_model_config:{register:configuid}:sidebar_enable - 40 = TEXT - 40.value = {$bootstrap.config.navbar_sectionmenu} - 50 = TEXT - 50.value = {$bootstrap.config.sidebar_rightenable} - 60 = TEXT - 60.value = {$bootstrap.config.sidebar_enable} + + } + 60.if { + isTrue.cObject = COA + isTrue.cObject { + 10 = TEXT + 10.value = 1 + 10.if.isTrue = {$bootstrap.db.navbar_sectionmenu} + 20 = TEXT + 20.value = 1 + 20.if { + equals = Section + value = {$bootstrap.db.sidebar_enable} + } + 30 = TEXT + 30.value = 1 + 30.if { + equals = Section + value = {$bootstrap.db.sidebar_rightenable} + } + 40 = TEXT + 40.value = 1 + 40.if.isTrue = {$bootstrap.config.navbar_sectionmenu} + 50 = TEXT + 50.value = 1 + 50.if { + equals = Section + value = {$bootstrap.config.sidebar_rightenable} + } + 60 = TEXT + 60.value = 1 + 60.if { + equals = Section + value = {$bootstrap.config.sidebar_enable} } } } @@ -302,8 +427,8 @@ page { 70.if { value = {$bootstrap.config.lastModifiedContentElement} equals = 1 - isTrue.cObject = {$bootstrap.config.recentlyUpdatedContentElements} } + 70.isTrue = {$bootstrap.config.recentlyUpdatedContentElements} # # Main Config @@ -311,21 +436,10 @@ page { 90 = T3SBS\T3sbootstrap\DataProcessing\ConfigProcessor 90 { navbarExtraRow = {$bootstrap.navbar.extraRow} - rootline = {$bootstrap.config.rootline} + rootline = {$bootstrap.db.general_rootline} webp = {$bootstrap.extconf.webp} disableDefaultCss = {$bootstrap.config.disableDefaultCss} - dataProcessing { - 10 = TYPO3\CMS\Frontend\DataProcessing\FilesProcessor - 10 { - references { - table = pages - fieldName = media - } - as = pagemedia - } - } } } } } - diff --git a/Configuration/TypoScript/Page/_main.typoscript b/Configuration/TypoScript/Page/_main.typoscript index a97462bc..bc0de98f 100644 --- a/Configuration/TypoScript/Page/_main.typoscript +++ b/Configuration/TypoScript/Page/_main.typoscript @@ -23,4 +23,4 @@ [{$bootstrap.extconf.configOverride} == 1] print.10.settings.override < page.10.settings.override -[END] \ No newline at end of file +[END] diff --git a/Configuration/TypoScript/constants.typoscript b/Configuration/TypoScript/constants.typoscript index 0ff1b7f6..7d440f2c 100644 --- a/Configuration/TypoScript/constants.typoscript +++ b/Configuration/TypoScript/constants.typoscript @@ -13,7 +13,6 @@ plugin.tx_t3sbootstrap { } } - #------------------------------------------------------------------------------- # Constant Editor #------------------------------------------------------------------------------- @@ -28,11 +27,11 @@ bootstrap.cdn { # cat=bootstrap-cdn/a-enable/20; type=options[none=0, Cerulean=cerulean, Cosmo=cosmo, Cyborg=cyborg, Darkly=darkly, Flatly=flatly, Journal=journal, Litera=litera, Lumen=lumen, Lux=lux, Materia=materia, Minty=minty, Pulse=pulse, Sandstone=sandstone, Simplex=simplex, Sketchy=sketchy, Slate=slate, Solar=solar, Spacelab=spacelab, Superhero=superhero, United=united, Yeti=yeti]; label=Bootswatch Themes CDN - works only without EXT ws_scss: Override default Bootstrap values with selected Bootswatch Theme (run Scheduler) - Info: https://bootswatch.com/. bootswatch = 0 # cat=bootstrap-cdn/b-version/10; type=small; label=Bootstrap: - bootstrap = 4.5.2 + bootstrap = 4.5.3 # cat=bootstrap-cdn/b-version/11; type=small; label=Popper js: popperjs = 1.16.1 # cat=bootstrap-cdn/b-version/12; type=small; label=Fontawesome: - fontawesome = 5.14.0 + fontawesome = 5.15.1 # cat=bootstrap-cdn/b-version/20; type=small; label=jQuery library: jQuery 3.5.0 won't work with Bootstrap 4.4.1. Dropdowns and collapse don't work. Reverted to jQuery 3.4.1 to make it work. jquery = 3.5.1 # cat=bootstrap-cdn/b-version/22; type=small; label=jQuery Easing: @@ -40,9 +39,9 @@ bootstrap.cdn { # cat=bootstrap-cdn/b-version/25; type=int+; label=Cookieconsent: set to 3 only to get v3.x (latest) cookieconsent = 3 # cat=bootstrap-cdn/b-version/27; type=small; label=Highlight: used with codesnippet - highlight = 10.2.0 + highlight = 10.4.0 # cat=bootstrap-cdn/b-version/30; type=small; label=Lazyload: - lazyload = 17.1.2 + lazyload = 17.3.0 # cat=bootstrap-cdn/b-version/32; type=small; label=Picturefill: picturefill = 3.0.3 # cat=bootstrap-cdn/b-version/35; type=small; label=Viewportchecker: @@ -56,13 +55,13 @@ bootstrap.cdn { # cat=bootstrap-cdn/b-version/45; type=small; label=Lightcase: lightcase = 2.5.0 # cat=bootstrap-cdn/b-version/47; type=small; label=YouTube player - jquery.mb.YTPlayer: - ytPlayer = 3.3.4 + ytPlayer = 3.3.5 # cat=bootstrap-cdn/c-integrity/10; type=small; label=Bootstrap CSS: - bootstrapCssIntegrity = sha384-JcKb8q3iqJ61gNV9KGb8thSsNjpSL0n8PARn9HuZOnIxN0hoP+VmmDGMN5t9UJ0Z + bootstrapCssIntegrity = sha384-TX8t27EcRE3e/ihU7zmQxVncDAy5uIKz4rEkgIXeMed4M0jlfIDPvg6uqKI2xXr2 # cat=bootstrap-cdn/c-integrity/11; type=small; label=Bootstrap JS: - bootstrapJsIntegrity = sha384-B4gt1jrGC7Jh4AgTPSdUtOBvfO8shuf57BaghqFfPlYxofvL8/KUEfYiJOMMV+rV + bootstrapJsIntegrity = sha384-w1Q4orYjBQndcko6MimVbzY0tgp4pWB4lZ7lr30WKz0vr/aWKhXdBNmNb5D92v7s # cat=bootstrap-cdn/c-integrity/12; type=small; label=Popper js: - popperjsIntegrity = + popperjsIntegrity = sha384-9/reFTGAW83EW2RDu2S0VKaIzap3H66lZH81PoYlFhbGU+6BZp6G7niu735Sk7lN # cat=bootstrap-cdn/c-integrity/20; type=small; label=jQuery library: jqueryIntegrity = # cat=bootstrap-cdn/c-integrity/22; type=small; label=jQuery Easing: @@ -97,8 +96,6 @@ bootstrap.cdn { # customsubcategory=dsn-config=Background Image # customsubcategory=e-config=Other Config bootstrap.config { - # cat=bootstrap-config/a-config/10; type=boolean; label=Data for "T3SB Config" on subpages: if disable from rootpage or from rootline if enabled (slide). - rootline = 1 # cat=bootstrap-config/a-config/20; type=boolean; label=Content Only On Rootpage: disable navbar, jumbotron, breadcrumb and footer on rootpage if enabled. contentOnlyOnRootpage = 0 # cat=bootstrap-config/a-config/30; type=boolean; label=jQuery in header: load jquery into the header if activated. @@ -136,8 +133,6 @@ bootstrap.config { # cat=bootstrap-config/da-config/020; type=options[primary=primary, secondary=secondary, success=success, danger=danger, warning=warning, info=info, light=light, dark=dark]; label=Loading Spinner Color: loadingSpinnerColor = primary - # cat=bootstrap-config/dsm-config/040; type=boolean; label=Enable animated scrolling and scrollspy for Section-Menu-Items: jsFooterInline.5.14 - sectionmenuScrolling = 0 # cat=bootstrap-config/dsm-config/043; type=small; label=Anchor extra offset for Section-Menu-Items: in px - jsFooterInline.5.14 sectionmenuAnchorOffset = 29 # cat=bootstrap-config/dsm-config/044; type=small; label=Scrollspy offset: in px - to activate the menu item - jsFooterInline.5.14 @@ -334,13 +329,13 @@ styles.content.textmedia.linkWrap.width = 1140m styles.content.textmedia.linkWrap.height = 800m #disable some not used constants -styles.content.textmedia.maxWInText > -styles.content.textmedia.columnSpacing > -styles.content.textmedia.rowSpacing > -styles.content.textmedia.textMargin > -styles.content.textmedia.borderColor > -styles.content.textmedia.borderWidth > -styles.content.textmedia.borderPadding > +styles.content.textmedia.maxWInText = +styles.content.textmedia.columnSpacing = +styles.content.textmedia.rowSpacing = +styles.content.textmedia.textMargin = +styles.content.textmedia.borderColor = +styles.content.textmedia.borderWidth = +styles.content.textmedia.borderPadding = # pages override pages.override { diff --git a/Configuration/TypoScript/setup.typoscript b/Configuration/TypoScript/setup.typoscript index bfcdff2b..ef0e37f2 100644 --- a/Configuration/TypoScript/setup.typoscript +++ b/Configuration/TypoScript/setup.typoscript @@ -6,14 +6,12 @@ module.tx_t3sbootstrap { layoutRootPaths.0 = EXT:t3sbootstrap/Resources/Private/Backend/Layouts/ } settings { - t3sbConfig.rootline = {$bootstrap.config.rootline} customScss = {$bootstrap.extconf.customScss} customScssPath = {$bootstrap.extconf.customScssPath} editScss = {$bootstrap.extconf.editScss} bootswatch = {$bootstrap.extconf.bootswatch} bootswatchURL = https://bootswatch.com/4/ indexedsearch = {$bootstrap.ext.indexedsearch} - modalform = {$bootstrap.ext.form.modal} expandedContent = {$bootstrap.extconf.expandedContent} rollyourown = {$bootstrap.extconf.rollyourown} wsScss = {$bootstrap.ext.wsScss} diff --git a/Resources/Private/Backend/Partials/Config/General.html b/Resources/Private/Backend/Partials/Config/General.html new file mode 100644 index 00000000..1766ae37 --- /dev/null +++ b/Resources/Private/Backend/Partials/Config/General.html @@ -0,0 +1,26 @@ + +
+ +
+
+ +
+ Use configuration from rootline (slide) if enabled or from rootpage if disabled.
+ If your installation only needs one configuration, this should be disabled!

+ (formerly known as a constant: bootstrap.config.rootline) +
+
+
+ + + diff --git a/Resources/Private/Backend/Partials/Version10/Accordion.html b/Resources/Private/Backend/Partials/Version10/Accordion.html index 4c65c952..82c83d67 100644 --- a/Resources/Private/Backend/Partials/Version10/Accordion.html +++ b/Resources/Private/Backend/Partials/Version10/Accordion.html @@ -1,5 +1,20 @@
+
+
+

+ +

+
+
+
+ +
+
+
+

diff --git a/Resources/Private/Backend/Partials/Version9/Accordion.html b/Resources/Private/Backend/Partials/Version9/Accordion.html index b8bb7290..43dd0983 100644 --- a/Resources/Private/Backend/Partials/Version9/Accordion.html +++ b/Resources/Private/Backend/Partials/Version9/Accordion.html @@ -1,5 +1,20 @@
+
+ +
+
+ +
+
+
+