[TYPO3-ect] as*() functions

Elmar Hinz elmar07 at googlemail.com
Mon Oct 8 02:33:02 CEST 2007


Franz Koch wrote:

> Hi,
> 
>> What do you think?
> 
> create your own view? I had the same problem as you some month ago (with
> some early alpha), and I simply enriched my view-object by the methods
> you mentioned - so it's no big deal.
> But it'll be nice if this would find a way in the default views of
> lib/div - so I'm glad you mentioned it.
> 
> --
> Greetings,
> Franz Koch

Hi, 

the solution I plan, is to make type casting and view rendering two
different steps available in differnt classes. The advantage is, that I can
display the same typecasted content in different views, i.e. HTML Page and
RSS feed. 

Daniels case would look similar like this:

$downloads=$this->get('downloads');
$c = new TypeCaster();
foreach ($downloads as $download) {
        ?>
        <h3><? print $c->plainToXHTML($download['title'])?></h3>
        ...

Regards

Elmar
















More information about the TYPO3-team-extension-coordination mailing list