typo3 fluid namespaces

raw

0 question.txt

fluid templates: Is there a way to use the normal XML-style declaration of namespaces when I don't have a top-level html element?

such as <f:if xmlns:foo="http://typo3.org/ns/foo\bar" condition="..."> ?

or maybe a dummy toplevel element that does not get rendered?
raw

1 partial.xml

1
2
3
4
5
6
7
8
9
10
11
<?xml version="1.0"?>
<html xmlns:f="TYPO3FluidViewHelpers" xmlns:at="http://typo3.org/ns/foo/bar/ViewHelper">
 <f:comment>
  parameters:
  - "datum": datum object with "value" property
  - "key": array key, e.g. "foo.bar"
 </f:comment>
 <f:if condition="{datum}">
  <li><at:textdb key="{key}"/></li>
 </f:if>
</html>
raw

2 output.html

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
...
 
<ul>
 
<?xml version="1.0"?>
<html xmlns:f="TYPO3FluidViewHelpers" xmlns:at="http://typo3.org/ns/foo/bar/ViewHelper">
 <li>Foo</li>
</html>
 
<?xml version="1.0"?>
<html xmlns:f="TYPO3FluidViewHelpers" xmlns:at="http://typo3.org/ns/foo/bar/ViewHelper">
 <li>Bar</li>
</html>
 
 
</ul>
 
...
raw

3 solution.txt

solution: <f:render partial="foo" section="p" arguments="{datum: datum, key:key}" /> and a <f:section name="p"> around the <li>

Note that this does not work for layouts :/
Christian Weiske Christian Weiske
owner

History