[TYPO3] HMENU and TMENU help please

Christopher bedlamhotel at gmail.com
Mon Aug 21 18:17:31 CEST 2006


Hello again,

On 8/21/06, Bryan <support at chillifactory.co.za> wrote:

<snip>

> thank you very much for your input, and yes using Joey's method would be
> the best, but I'm still learning here and having some difficulties. The
> entire site must be dynamic, and that is the purpose of using Typo3. So
> in using your TS above/below with some mods, would help. But I'm not
> that clued up on TS yet. What would I have to enter into my HTML
> template to populate it with dynamic TS. I've entered your TS above into
> my menu cOject extension, which my Menu template calls, but I get
> nothing. Here below is what I've got: (PS sorry if its a bit long)
>
> # Configuring the Auto-Parser for main template:
> plugin.tx_automaketemplate_pi1 {
>   content = FILE
>   content.file = fileadmin/template/main.htm
>   elements {
>     BODY.all = 1
>     BODY.all.subpartMarker = DOCUMENT_BODY
> # Main TEMPLATE cObject for the BODY
> temp.mainTemplate = TEMPLATE
> temp.mainTemplate {
>   template =< plugin.tx_automaketemplate_pi1
>   workOnSubpart = DOCUMENT_BODY
>
>     # Substitute the ###product_menu### subpart with dynamic menu:
>   subparts.product_menu < temp.products
>
>     # Substitute the ###content### subpart with some example content:
>   subparts.content < styles.content.get
> }
>
>
> # Default PAGE object:
> page = PAGE
> page.typeNum = 0
>
> # Copying the content from TEMPLATE for <body>-section:
> page.10 < temp.mainTemplate
>
> # Menu products (navigation)
> lib.navigation = COA
> lib.navigation {
>  wrap = <div id="navigation">|</div>
>
>  5 = HTML
>  5 {
>    value = More Products
>    value.wrap = <h3>|</h3>
>  }
>
>  10 = HMENU
>  10 {
>    1 = TMENU
>    1 {
>      noBlur = 1
>
>      NO {
>        wrapItemAndSub = <li>|</li>
>      }
>
>      ACT = 1
>      ACT < .NO
>      ACT.wrapItemAndSub = <li class="current">|</li>
>    }
>  }
> }

Well, you haven't added the new TS to your template just by adding it
to your template if you know what I mean :-)

Have a look at (or revisit) the MTB tutorial [1]. You basically need a
'subpart' or 'mark' in your HTML template for the menu (I guess you
probably already have this), and then you need to put something IN the
subpart/mark. You're already doing this in your template when you do
this stuff:

subparts.content < styles.content.get

So, if you have a subpart in your template like this:


<!--###MENU_OR_SOMETHING###-->
...
...
...
<!--###MENU_OR_SOMETHING###-->


...you're going to have to add something like:


subparts.MENU_OR_SOMETHING < lib.navigation


-Christopher


[1] http://typo3.org/documentation/document-library/tutorials/doc_tut_templselect/current/view/



More information about the TYPO3-english mailing list