[TYPO3] New Lines in HTML

Ron Hall rhall at irvingbible.org
Sat May 20 05:22:45 CEST 2006


Thank you. Although the I could not get the exact code you gave me to work,
both suggestions pointed me in the right direction. With them and some more
research in TSref and experimentation, this is the code I came up with that
gives me exactly what I want--indented HTML with each list item on its own
line.

// SETUP OF GLOBAL MENU
    gn.menuCode = HMENU
    gn.menuCode.entryLevel = 0
    gn.menuCode.1 = TMENU
    gn.menuCode.1 {
        // Normal Properties
            NO.before (
            
            <li>
            )
            NO.after = </li>
        // Active state properties  Level 1
            ACT = 1
            ACT.allWrap = <li class="active"> | </li>
            ACT.after.char = 10
        // Current state properties  Level 1
            CUR = 1
            CUR.before (
            
            <li class="current">
            )
            CUR.after = </li>
            }

Thanks again,
Ron


On 5/19/06 8:03 PM, "JoH" <info at cybercraft.de> wrote:

>>> Try something like this:
>>> 
>>> // SETUP OF GLOBAL MENU
>>> gn.menuCode = HMENU
>>> gn.menuCode.entryLevel = 0
>>> gn.menuCode.1 = TMENU
>>> gn.menuCode.1 {
>>> // Normal Properties Level 1
>>> NO.allWrap (
>>> <li>
>>>> 
>>> </li>
>>> )
>>> // Active state properties  Level 1
>>> ACT = 1
>>> ACT.allWrap (
>>> <li class="active">
>>>> 
>>> </li>
>>> // Current state properties  Level 1
>>> CUR = 1
>>> CUR.allWrap (
>>> <li class="current">
>>>> 
>>> </li>
>>> )
>>> }
>> I appreciate the reply but that does not do it. Perhaps you
>> misunderstand. I am satisfied with the formatting of my typoscript.
>> What I want to do is change the formatting of the HTML source it
>> outputs.
>> 
>> Currently the HTML source it outputs is on one line (the page itself,
>> of course, works fine). I want to put each <li> item on its own line
>> in the HTML source which makes it easier to evaluate.
> 
> And this is exactly what I understood and you can solve it by using the
> above code as an example.
> By putting wraps into brackets instead of one line after the =, you will get
> additional linebreaks into thwe HTML output.
> Maybe you have to insert some dummy code (comments or a span-tag) to get
> around the trimming of values in wraps.
> 
> NO.allWrap (
> <!-- Menuitem start-->
> 
> <li>
> |
> </li>
> 
> <!-- Menuitem end-->
> )
> 
> or
> 
> NO.allWrap (
> <li>
> <span>|</span>
> </li>
> )
> 
> Another solution could be using stdWrap functions:
> 
> NO.allWrap = <li>|</li>
> NO.allWrap.append = TEXT
> NO.allWrap.append.char = 10
> 
> Just try it out.
> 
> Joey




More information about the TYPO3-english mailing list