[TYPO3-50-general] [TYPO3-team-core-v5] Templating Engine
Ernesto Baschny [cron IT]
ernst at cron-it.de
Fri Oct 24 10:43:18 CEST 2008
Martin Ficzel wrote: on 23.10.2008 18:19:
> Ernesto Baschny [cron IT] schrieb:
>
>> <f3:for each="{blogPosts}" as="post" f3:xmlEntitiesReplace="true">
>> <h1>{post.title}
>> <p>{post.posterName}
>> <p>{post.posterEmail}
>> </f3:for>
>
> Please not. I do'nt want to care about xml-entities in non xml
> Templates. Thats hard to integrate in the development workflow for the
> templates.
>
> XML-Templates must validate and i really like the validation and
> autocompletion of tags and attributes by autogenerated dtds wich will
> work only for xml-templates.
Ok, but I don't see any way to make a valid XML document if you want to
create a (non-XML) HTML 3.2 template without escaping xmlEntities. This
is not XML:
<f3:for each="{blogPosts}" as="post" f3:xmlEntitiesReplace="true">
<h1>{post.title}
<p>{post.posterName}
<p>{post.posterEmail}
</f3:for>
So maybe using CDATA?
<f3:for each="{blogPosts}" as="post">
<![CDATA[
<h1>{post.title}
<p>{post.posterName}
<p>{post.posterEmail}
]]>
</f3:for>
Gets ugly if I want to add other <f3> tags inside:
<f3:for each="{blogPosts}" as="post">
<![CDATA[<h1>]]><f3:link>{post.title}</f3:link>
<![CDATA[<p>]]>{post.posterName}
<![CDATA[<p>]]>{post.posterEmail}
</f3:for>
Cheers,
Ernesto
More information about the TYPO3-project-5_0-general
mailing list