Skip to content

Commit

Permalink
BUGFIX: #127
Browse files Browse the repository at this point in the history
  • Loading branch information
t3solution committed Aug 19, 2021
1 parent a5ec310 commit e370953
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions Classes/Controller/ConfigController.php
Original file line number Diff line number Diff line change
Expand Up @@ -602,13 +602,12 @@ public function writeConstants(): void
$filecontent = '';
foreach ($this->rootTemplates as $key=>$rootTemplate) {
foreach ( $this->configRepository->findAll() as $config ) {
$rootLineArray = GeneralUtility::makeInstance(RootlineUtility::class, $config->getPid())->get();
if ( $config->getPid() == $rootTemplate['pid'] ) {
if ( count($this->rootTemplates) == 1 ) {
$filecontent .= self::getConstants($config, TRUE);
$filecontent .= 'bootstrap.config.navbarBreakpointWidth = '.$breakpointWidth.PHP_EOL.PHP_EOL;
} else {
if ($rootLineArray[0]['uid'] == $rootTemplate['pid'] ){
if ($this->rootPageId == $rootTemplate['pid'] ){
$filecontent .= '['.$rootTemplate['pid'].' in tree.rootLineIds]'.PHP_EOL;
$filecontent .= self::getConstants($config, TRUE);
$filecontent .= 'bootstrap.config.navbarBreakpointWidth = '.$breakpointWidth.PHP_EOL;
Expand All @@ -617,7 +616,7 @@ public function writeConstants(): void
}
} else {
if ( count($this->rootTemplates) == 1 ) {
if ($rootLineArray[0]['uid'] == $rootTemplate['pid'] ){
if ($this->rootPageId == $rootTemplate['pid'] ){
if ($config->getGeneralRootline() || $config->getNavbarMegamenu()) {
$filecontent .= '['.$config->getPid().' in tree.rootLineIds]'.PHP_EOL;
} else {
Expand All @@ -629,7 +628,7 @@ public function writeConstants(): void
}
} else {

if ($rootLineArray[0]['uid'] == $rootTemplate['pid'] ){
if ($this->rootPageId == $rootTemplate['pid'] ){

if ($config->getGeneralRootline() || $config->getNavbarMegamenu()) {
$filecontent .= '['.$rootTemplate['pid'].' in tree.rootLineIds && '.$config->getPid().' in tree.rootLineIds]'.PHP_EOL;
Expand Down

0 comments on commit e370953

Please sign in to comment.