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?
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> |
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> ... |
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 :/