[TYPO3-english] [Templating] Separating 1st level menu and 2nd level menu?

PIT Solutions typo3 at pitsolutions.com
Tue Oct 15 12:49:22 CEST 2013


Hi Salander,

Please try this typoscript; This is for 2 level menu with your requirement.

temp.sub_naviguation = HMENU
temp.sub_naviguation {
    special = directory
    special.value = {Root_id}
    wrap = <div id="main_naviguation">|</div>
    1 = TMENU
    1 {
        expAll = 0
        NO = 1
        NO.wrapItemAndSub = <li class="menu1-level1-no">|</li>
        ACT = 1
        ACT.wrapItemAndSub = <li class="menu1-level1-act">|</li>     
    }
    2 < .1
    2.wrap = <div id="sub_naviguation">|</div>
}

I hope this will help you.

With Regards,
Arun Chandran
Software Engineer
PIT Solutions Pvt Ltd


________________________________
 From: Salander <luc.berro at epitech.eu>
To: typo3-english at lists.typo3.org 
Sent: Tuesday, October 15, 2013 4:06 PM
Subject: [TYPO3-english]  [Templating] Separating 1st level menu and 2nd level menu?
 

Hello,

I have a little problem with templating.

I need to have the main_naviguation ( first level ) not in the same place as the sub_naviguation (second level).
With my configuration, I have the first level and the second level on one unique <DIV>, it's really annoying. They're packed in the <DIV> id="sub_naviguation".
I followed the tutorial "modern template building", and I have something like this :

> # Menu 1 cObject
> temp.sub_naviguation = HMENU
>  # First level menu-object, textual
> temp.sub_naviguation.1 = TMENU
> temp.sub_naviguation.1 {
>    # Normal state properties
>  NO.allWrap = <li class="menu1-level1-no"> | </li>
>    # Enable active state and set properties:
>  ACT = 1
>  ACT.allWrap = <li class="menu1-level1-act"> | </li>
> }
>  # Second level menu-object, textual
> temp.sub_naviguation.2 = TMENU
> temp.sub_naviguation.2 {
>     # Normal state properties
>   NO.allWrap = <li class="menu1-level2-no"> | </li>
>     # Enable active state and set properties:
>  ACT = 1
>  ACT.allWrap = <li class="menu1-level2-act"> | </li>
>  }

> # Main TEMPLATE cObject for the BODY
> temp.mainTemplate = TEMPLATE
> temp.mainTemplate {
> ...
>  subparts.sub_naviguation < temp.sub_naviguation
> ... }


What I would like to do is, EITHER :
- I have the first level in a seperate <DIV> called for example id="main_naviguation", and the second level of my menu in an other <DIV> called id="sub_naviguation"
OR
- I have the first level of my menu ( main_naviguation ) static (brute URL) on my HTML in the <DIV> id="main_naviguation", and I only want to display the dynamic second level menu  in the <DIV> id="sub_naviguation". So yeah, the first level isn't dynamic.

Any clue would be benefic to me, If I was confusing,sorry , I'm crap at english.

Thanks for your help.

Salander
_______________________________________________
TYPO3-english mailing list
TYPO3-english at lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english


More information about the TYPO3-english mailing list