b13 / menus

TYPO3 Extension for creating fast menus in a fast fashion
GNU General Public License v2.0
54 stars 21 forks source link

Possibility of "entryLevel" for a subMenu? #42

Closed kraemer-igroup closed 3 years ago

kraemer-igroup commented 3 years ago

Hi there,

I like to switch our menus to use your extension. We have a mainMenu and a subMenu with entryLevel = 1. Is there a way with the menus extension to achieve "entryLevel = 1" (like HMENU)? https://docs.typo3.org/m/typo3/reference-typoscript/master/en-us/ContentObjects/Hmenu/#hmenu-entrylevel

I guess it would work to set the "entryPoints" to the current active page from mainMenu. But I can not think of a solution to get this value in typoscript...

lib.menuMain = FLUIDTEMPLATE
lib.menuMain {
  dataProcessing {
    10 = TYPO3\CMS\Frontend\DataProcessing\MenuProcessor
    10 {
      levels = 2
      as = menuMain
    }
  }
}

lib.menuSub = FLUIDTEMPLATE
lib.menuSub {
  dataProcessing {
    10 = TYPO3\CMS\Frontend\DataProcessing\MenuProcessor
    10 {
      levels = 3
      entryLevel = 1
      as = menuSub
    }
  }
}
josefglatz commented 3 years ago

@bmack I was actually also searching for such configuration. Are there any reasons why such option isn't supported? (maybe it's just a missing info in the README)

christian-fries commented 3 years ago

I have the same use case in most of my projects. Would be an interesting feature to replace all old HMENUs

bmack commented 3 years ago

Question for @christian-fries and @josefglatz - isn't this possible with https://docs.typo3.org/m/typo3/reference-typoscript/master/en-us/DataTypes/Properties/GetText.html?highlight=leveluid#leveltitle-leveluid-levelmedia

Such as:

9999 = B13\Menus\DataProcessing\TreeMenu
9999 {
  entryPoints.data = leveluid:1
}
josefglatz commented 3 years ago

Question for @christian-fries and @josefglatz - isn't this possible with https://docs.typo3.org/m/typo3/reference-typoscript/master/en-us/DataTypes/Properties/GetText.html?highlight=leveluid#leveltitle-leveluid-levelmedia

Such as:

9999 = B13\Menus\DataProcessing\TreeMenu
9999 {
  entryPoints.data = leveluid:1
}

Didn't tried this but looks OKish https://github.com/b13/menus/blob/master/Classes/Compiler/TreeMenuCompiler.php#L26 @bmack! Maybe it's more the fact that we think the settings must be the same as it was in the TypoScript-Times "long time ago".

bmack commented 3 years ago

Will close this issue. Seems OK