Search code examples
typo3typoscripttypo3-6.1.x

In TypoScript, how to check for a setting on parent page


In TypoScript, you can check for a setting in page details:

if.isTrue.data = page:tx_myext_siblingsnav

In my case, to display a submenu.

But now I would like to check if this setting exists on the parent page (no "slide").

if.isTrue.data = levelfield:-2,page:tx_myext_siblingsnav

Wouldn't work.

How do I do that?


Solution

  • if.isTrue.data = levelfield:-2,tx_myext_siblingsnav
    

    and in AdditionalConfiguration.php:

    $GLOBALS['TYPO3_CONF_VARS']['FE']['addRootLineFields'] = 'tx_myext_siblingsnav';
    

    (I thought the rootlinefields had to be added only for "slide", but no.)