Michael
Michael

Reputation: 89

Typo3: Output of all 2nd level pages as menu independent of active pages

I want to create a menu of all 2nd level items at once in separate DIVs (outside the first level menu) - independent of the active page. Do you have an hint for me? Thank you very much for your help!!

Upvotes: 0

Views: 115

Answers (3)

Michael
Michael

Reputation: 89

Thank you for your answers! I found a similar solution like the one Cristian Buja posted, that works fine for me. Here's the code if someone have the same issue: `lib.subnav = HMENU lib.subnav {

1 = TMENU
1 {
    expAll = 1
    NO.doNotShowLink = 1

    IFSUB = 1
    IFSUB.doNotShowLink = 1
    IFSUB.allWrap = <div id="s{elementUid}" class="nv-sub-wrapper"><div class="nv-sub-menu clearfix">|
    IFSUB.wrapItemAndSub = |<div class="nv-sub-info"></div></div></div>
    IFSUB.subst_elementUid = 1
}

2 = TMENU
2 {
    wrap = <ul>|</ul>
    NO = 0
    NO {
        ATagParams = data-description="{field:abstract // field:subtitle // field:title}"
        ATagParams.insertData = 1
        wrapItemAndSub = <li>|</li>
    }
}

}`

Upvotes: 0

Cristian Buja
Cristian Buja

Reputation: 1

I think you are looking something like this:

lib.menu = COA
lib.menu {

    # Menu of first Level
    10 = HMENU
    10.entryLevel = 0
    10.1 = TMENU
    10.1.wrap = <ul> | </ul>
    10.1.NO.allWrap = <li>|</li>

    # Menu of all second levels
    20 = HMENU
    20.entryLevel = 0
    20.1 = TMENU
    20.1.expAll = 1
    20.1.NO.doNotLinkIt = 1
    20.1.NO.doNotShowLink =1
    20.1.IFSUB = 1
    20.1.IFSUB.doNotLinkIt = 1
    20.1.IFSUB.allWrap = <h4>2°lv (|) </h4>
    20.2 = TMENU
    20.2.wrap = <ul> | </ul>
    20.2.NO.allWrap = <li> | </li>

}

Upvotes: 0

Bernd Wilke πφ
Bernd Wilke πφ

Reputation: 10800

don't forget to configure

1.expAll = 1

in your typoscript menu definition

Upvotes: 1

Related Questions