[TYPO3-english] Flat Menu (like a Table of Contents) Into subpagesand their content element headings

JoH asenau info at cybercraft.de
Thu Jul 2 16:49:07 CEST 2009


>   renderObj = TEXT
>   renderObj {
>     field = header
>     wrap=<span class="text">|</span><br>
>     typolink.parameter.field=pid
>     typolink.parameter.dataWrap=|
>     typolink.additionalParams.insertData=1
>     typolink.additionalParams=&content_id={field:uid}
>     typolink.no_cache=1
>     if.isTrue.field=header
>   }

This code looks like complete nonsense to me, since you are linking to the
current page (and therfor don't need to use the pid) and "no_cache" is never
a good idea.
Try this one instead:

renderObj = TEXT
renderObj {
    field = header
    wrap=<span class="text">|</span><br>
    typolink {
        parameter.dataWrap = #{field:uid}
    }
}

To check if the header is set you should better use the MySQL query instead
of TypoScript "if".

> Can anyone give me any specific clues how to extend this idea so I can
> show on one page a table of contents build from the next layer of
> pages, and the the content elements there in like so:

10 = COA
10 {
    10 = HMENU
    10 {
        entryLevel = -1
        1 = TMENU
        1 {
            wrap = <ul>|</ul>
            NO {
                allWrap = <li>|</li>
                after.cObject = COA
                after.cObject {
                    wrap = <ul>|</ul>
                    10 = CONTENT
                    10 {
                        table = tt_content
                        select {
                            pidInList.field = uid
                            orderBy = sorting
                            where = colPos=0 AND header
                            languageField=sys_language_uid
                        }
                        renderObj = TEXT
                        renderObj {
                            dataWrap = <li>{field:header}</li>
                            typolink {
                                parameter.dataWrap = {field:pid}#{field:uid}
                            }
                        }
                    }
                }
            }
        }
    }
}

Not tested though

HTH

Joey

-- 
Wenn man keine Ahnung hat: Einfach mal Fresse halten!
(If you have no clues: simply shut your gob sometimes!)
Dieter Nuhr, German comedian
Xing: http://contact.cybercraft.de
Twitter: http://twitter.com/bunnyfield
TYPO3 cookbook (2nd edition): http://www.typo3experts.com
TYPO3 workshops: http://workshops.eqony.com




More information about the TYPO3-english mailing list