Project

General

Profile

Actions

Bug #17391

closed

TMENU .before property adds extra line return in output

Added by Ron Hall over 17 years ago. Updated about 11 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2007-06-16
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.1
PHP Version:
5.2
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

This is a minor thing that only impacts the formatting of the source code in the front end. It appears that the .before property is adding an extra line after its code. It does this in verison 4.1.1 but not in 4.0.4. I prefer it be like it was in 4.04 so output code can be formatted. Of course, this is minor and does not affect the look of the website only the HTML source. Following is the code and the resulting output.

I am using this TS code to generate a menu:

  1. SETUP GLOBAL MENU
    lib.globalMenu = HMENU
    lib.globalMenu.entryLevel = 0
    lib.globalMenu.1 = TMENU
    lib.globalMenu.1.noBlur = 1
    lib.globalMenu.1 {
    wrap = <ul id="globalmenu"> | </ul> # Normal State Properties
    NO.before (<li>
    )
    NO.after = </li>
    1. Current State Properties
      ACT = 1
      ACT.before (
    &lt;li class=&quot;active&quot;&gt;
    )
    ACT.after = &lt;/li&gt;
    }

In version 4.1.1 the output looks like this:

<ul id="globalmenu">
<li class="active">
<a href="index.php?id=3" >Home</a></li>
<li>
<a href="index.php?id=24" >About Us</a></li>
<li>
<a href="index.php?id=4" >Products</a></li>
<li>
<a href="index.php?id=23" >Contact</a></li></ul>

In 4.0.4 it looks like this:

<ul id="globalmenu">
<li class="active"><a href="index.php?id=3" >Home</a></li>
<li><a href="index.php?id=24" >About Us</a></li>
<li><a href="index.php?id=4" >Products</a></li>
<li><a href="index.php?id=23" >Contact</a></li></ul>

(issue imported from #M5808)

Actions #1

Updated by Ron Hall over 17 years ago

Sorry, the category on this should be probably be "frontend"

Also, looks like it is not easliy showing my HTML codes examples. I will paste here the same thing but encoded. This can be decoded to see what I mean at http://www.opinionatedgeek.com/DotNet/Tools/HTMLEncode/Decode.aspx. The decoded text can then be cut and pasted into an editor to eliminate soft wraps.

Thanks,,
Ron

In version 4.1.1 the output looks like this:

<ul id="globalmenu">
<li class="active">
<a href="index.php?id=3" >Home</a></li>
<li>
<a href="index.php?id=24" >About Us</a></li>
<li>
<a href="index.php?id=4" >Products</a></li>
<li>
<a href="index.php?id=23" >Contact</a></li></ul>

In 4.0.4 it looks like this:

<ul id="globalmenu">
<li class="active"><a href="index.php?id=3" >Home</a></li>
<li><a href="index.php?id=24" >About Us</a></li>
<li><a href="index.php?id=4" >Products</a></li>
<li><a href="index.php?id=23" >Contact</a></li></ul>

Actions #2

Updated by Simon Schaufelberger almost 13 years ago

  • Target version deleted (0)

i think this line break come from your "()". before and after are handled exactly the same as i see in tslib_menu.php

Actions #3

Updated by Alexander Opitz over 11 years ago

  • Category deleted (Communication)
  • Status changed from New to Needs Feedback

The issue is very old, does this issue exists in newer versions of TYPO3 CMS (4.5 or 6.1)?

Actions #4

Updated by Simon Schaufelberger over 11 years ago

i guess you can close this as the normal usage is with = insead of ()

Actions #5

Updated by Alexander Opitz about 11 years ago

  • Status changed from Needs Feedback to Closed
  • Is Regression set to No
Actions

Also available in: Atom PDF