[TYPO3-mvc] FLUIDTEMPLATE - difference between f:cObject and f:format
Tobias Liegl
tliegl at gmail.com
Sat Feb 12 20:47:57 CET 2011
Hi all,
normally I'm a templavoila user, but with the 4.5 release I tried to use
the new FLUIDTEMPLATE. I tested how it works, to get the normal content
elements into the template with the following TS.
------ typoscript ------
page = PAGE
page {
10 = FLUIDTEMPLATE
10 {
file = fileadmin/templates/index.html
variables {
content < styles.content.get
}
}
}
lib.field_content < styles.content.get
------ typoscript ------
You see I used two different ways to assign the content - just for
testing purposes. In the template file I have these two lines of code.
------ index.html ------
<f:format.html>{content}</f:format.html>
<f:cObject typoscriptObjectPath="lib.field_content" />
------ index.html ------
With both snippets I get the following html output.
<div id="c1" class="csc-default"><div class="csc-header
csc-header-n1"><h1 class="csc-firstHeader">Header</h1></div><pText</p></div>
But after modifying the dataWrap of the header with the following code,
I get two different outputs.
lib.stdheader.stdWrap.dataWrap = |
The output with <f:cObject> is:
<div id="c1" class="csc-default"><h1
class="csc-firstHeader">Header</h1><p>Text</p></div>
with <f:format.html> it looks like this:
<div id="c1" class="csc-default"><p><h1
class="csc-firstHeader">Header</h1><p>Text</p></p></div>
So the <div class="csc-header csc-header-n1"></div>, which I intended to
remove, got replaced by a <p></p> with <f.format.html>.
Why is this happening in this case? Is this a bug?
Greets,
Tobi
More information about the TYPO3-project-typo3v4mvc
mailing list