[TYPO3] New Lines in HTML

JoH info at cybercraft.de
Sat May 20 03:03:34 CEST 2006


>> 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

-- 
Wenn man keine Ahnung hat: Einfach mal Fresse halten!
(If you have no clues: simply shut your knob sometimes!)
Dieter Nuhr, German comedian
openBC: http://www.cybercraft.de





More information about the TYPO3-english mailing list