[TYPO3-english] Content of FLUIDTEMPLATE polluted with <p class="bodytext">&nbsp; </p>

Žiga Dolhar ziga at dolhar.si
Fri Dec 30 23:20:31 CET 2011


Dear List,

I'm trying the new FLUID templating with typo3 4.6.3.

The issue I'm experiencing is that everything rendered with 
FLUIDTEMPLATE object gets parsed and all new lines [empty lines] 
replaced with <p class="bodytext">&nbsp;</p>.

Now, I tried the following:

lib.parseFunc_RTE.nonTypoTagStdWrap.encapsLines.nonWrappedTag >
lib.parseFunc_RTE.nonTypoTagStdWrap.encapsLines.innerStdWrap_all.ifBlank >

The first line removes the P-wrap. However, &nbsp;-s remain, which is 
unwelcome. However, it also removes otherwise "valid" wrappings 
(paragraphs), such as those in text entered through RTE (or in news items).

The second line removes &nbsp;-s.

I would think this behavior (wholesomely parsing/wrapping everything) is 
a bit odd and unexpected. For instance, even the comments generated by 
typo3 (css styled content probably?) get wrapped:

		<p class="bodytext">&nbsp;</p>
<p class="bodytext">	<!--  CONTENT ELEMENT, uid:226/text [begin] --></p>
<p class="bodytext">&nbsp;</p><div id="c226" class="csc-default"><p 
class="bodytext">&nbsp;</p>
<p class="bodytext">		<!--  Header: [begin] --></p>
<p class="bodytext">&nbsp;</p><div class="csc-header csc-header-n1"><h1 
class="csc-firstHeader">About</h1></div><p class="bodytext">		<!-- 
Header: [end] --></p>

<p class="bodytext">&nbsp;</p>
<p class="bodytext">		<!--  Text: [begin] --></p>


Is there something I am doing wrong?

My root template goes as follows:

page = PAGE
page {
   typeNum = 0

   10 = FLUIDTEMPLATE
   10 {
     partialRootPath = fileadmin/--templates/partials
     layoutRootPath = fileadmin/--templates/layouts
     variables {
       content < styles.content.get
       content_left < styles.content.get
       content_left.select.where = colPos = 1
       content_right < styles.content.get
       content_right.select.where = colPos = 2
     }

     file.stdWrap.cObject = CASE
     file.stdWrap.cObject {
       key.data = levelfield:-1, backend_layout_next_level, slide
       key.override.field = backend_layout

       default = TEXT
       default.value = fileadmin/--templates/threeColumn.html

       2 = TEXT
       2.value = fileadmin/--templates/threeColumn.html

       3 = TEXT
       3.value = fileadmin/--templates/fullSize.html

     }
   }

}

Thanks for any hints!

Yours,
Žiga D.


More information about the TYPO3-english mailing list