[TYPO3] split navigatin per level

Tim Loenders tloenders at gmail.com
Thu Aug 10 11:57:02 CEST 2006


Thanks a lot. The entryLevel parameter did the trick. I will check the last
bit of code when I start using templavoila.

On 8/9/06, Another Vision <info at anothervision.co.uk> wrote:
>
> Hi Tim
>
> I've achieved exactly the effact you describe based on the Modern Template
> Building tutorial using the Template Auto-parser extension...
>
> In my html template I have the two areas set as CSS styled divs. The menus
> themselves are also wrapped in css styled divs allowing you to style them
> too. The <!-- ### ... ### --> areas are replaced with dynamic content
>
>   <div id="mainnavcontainer">
>           <!-- ###mainnav### -->
>           main nav here
>           <!-- ###mainnav### -->
>         </div>
>
> And
>
> <div id="left">
>         <!-- ###subnav### -->
>         <div id="subnavcontainer"> subnav here </div>
>         <!-- ###subnav### -->
>         <!-- ###colLeft### -->
>         lefthand column
>         <!-- ###colLeft### -->
> </div>
>
>
> [you'll note that the content for the left hand column is inserted below
> the
> subnav menu]
>
>
>
> The TS in the template is something like this
>
> # Configuring the Auto-Parser for main template:
>
> plugin.tx_automaketemplate_pi1 {
>
> # Read the template file:
>
> content = FILE
> content.file = fileadmin/templates/page.html
>
> # Here we define which elements in the HTML that
> # should be wrapped in subpart-comments:
>
> elements {
> BODY.all = 1
> BODY.all.subpartMarker = DOCUMENT_BODY
>
> HEAD.all = 1
> HEAD.all.subpartMarker = DOCUMENT_HEADER
> HEAD.rmTagSections = title
>
> #uncomment this to wrap all divs
> #DIV.all = 1
>   }
>
> # Prefix all relative paths with this value:
> relPathPrefix = fileadmin/templates/
> }
>
> ##
>
> # Main TEMPLATE cObject for the BODY
> temp.mainTemplate = TEMPLATE
> temp.mainTemplate {
>
>   # Feeding the content from the Auto-parser to the TEMPLATE cObject:
>   template =< plugin.tx_automaketemplate_pi1
>
>   # Select only the content between the <body>-tags
>   workOnSubpart = DOCUMENT_BODY
>
> # Substitute the subparts
> subparts {
> mainnav < temp.mainnav
> subnav < temp.subnav
> colNormal < styles.content.get
> colRight < styles.content.getRight
> colLeft < styles.content.getLeft
> }
> }
>
> # Main TEMPLATE cObject for the HEAD
> temp.headTemplate = TEMPLATE
>
> temp.headTemplate {
>   # Feeding the content from the Auto-parser to the TEMPLATE cObject:
>   template =< plugin.tx_automaketemplate_pi1
>
>   # Select only the content between the <head>-tags
>   workOnSubpart = DOCUMENT_HEADER
> }
>
> # Default PAGE object:
> page = PAGE
> page.typeNum = 0
>
> # Copying the content from TEMPLATE for <body>-section:
> page.10 < temp.mainTemplate
>
> # Copying the content from TEMPLATE for <head>-section:
> page.headerData.10  < temp.headTemplate
>
> tt_content.stdWrap.space = 0
>
> ##
>
> #TS Setup to parse the navigation
>
> # Menu 1 cObject
> temp.mainnav = HMENU
>
> # First level menu-object, textual
> temp.mainnav.1 = TMENU
> temp.mainnav.1 {
>   expALL = 1
>   ACT = 0
>   # Normal state properties
>   NO.allWrap = <div class="mainnav">|</div><div class="navspace"></div>
>
>   # Enable active state and set properties:
>   ACT = 1
>   ACT.allWrap = <div class="mainnav-down">|</div><div
> class="navspace"></div>
> }
>
> # subnav Menu (menu_1) cObject with 2 levels
> temp.subnav = HMENU
> temp.subnav.wrap = <div id="subnavcontainer">|</div>
>
> temp.subnav.entryLevel = 1
>   # First level menu-object, textual
> temp.subnav.1 = TMENU
> temp.subnav.1 {
>     # Normal state properties
>   NO.allWrap = <div class="subnav"> | </div>
>     # Enable active state and set properties:
>   ACT = 1
>   ACT.allWrap = <div class="subnav-down"> | </div>
> }
>   # Second level menu-object, textual
> temp.subnav.2 = TMENU
> temp.subnav.2 {
>     # Normal state properties
>   NO.allWrap = <div class="subnav1"> | </div>
>     # Enable active state and set properties:
>   ACT = 1
>   ACT.allWrap = <div class="subnav1-down"> | </div>
> }
>
> ##
>
> Hope this makes sense... I have the sections of it split up in a sys
> folder
> called template-store then linked to the home and internal page templates
> as
> described in the tutorial (if I remember right!)
>
> Mike
>
>
> -----Original Message-----
> From: typo3-english-bounces at lists.netfielders.de
> [mailto:typo3-english-bounces at lists.netfielders.de] On Behalf Of Tim
> Loenders
> Sent: Wednesday 9 August 2006 13:52
> To: TYPO3-english at lists.netfielders.de
> Subject: [TYPO3] split navigatin per level
>
> Hello,
>
> I am wondering if it's possible to split up the menu in 2 levels and place
> them somewhere different in the html template with two different markers?
>
> e.g. level one would be in a <td> on the top and is horizontal and level 2
> would be in a different <td> at the left side of the template and is
> vertical.
>
> It's a very conservative navigation but I can't seem to find an example
> for
> it.
>
> Thanks for any help!!
>
> --
> Tim
> _______________________________________________
> TYPO3-english mailing list
> TYPO3-english at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english
>
>
>
>
>
> _______________________________________________
> TYPO3-english mailing list
> TYPO3-english at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english
>



-- 
Tim



More information about the TYPO3-english mailing list