[TYPO3-mvc] Usage of Extbase MVC (Controllers, Repositories) and Fluid inside eID

Thomas "Thasmo" Deinhamer thasmo at gmail.com
Sat Dec 11 22:43:03 CET 2010


Stefan Isak wrote:
> Hey,
>
> personally I don't really like the eID approach.
>  From my point of view I recommend using a different page type.
> You can have a look at the new ajax widget of fluid provided in actual versions.

I also like page types, but I think they fit better to represent the 
actual content of a page. In my case I need to return specific content, 
not only page content.

> As you already mentioned, page types perfectly fit for variation output of a page.
> I think a JSON or XML output is nothing else than a variation output.
>
> You can then easily set the format parameter to switch between the different templates:
>
> index.php?id=1&type=123456789&tx_ext_plugin[action]=index&tx_ext_plugin[controller]=MyController&tx_ext_plugin[format]=json
>> Template file: Resources/Private/Template/MyController/Index.json
>
> index.php?id=1&type=123456789&tx_ext_plugin[action]=index&tx_ext_plugin[controller]=MyController&tx_ext_plugin[format]=xml
>> Template file: Resources/Private/Template/MyController/Index.xml
>
> Default value of format is html, so you typically have a Index.html template for your indexAction.
> Of course you can write fluid code as usual in your Index.json/Index.xml templates.

I'm aware of this but thanks for mentioning anyway.

> Cheers
> Stefan

So, in general I'd like to gather different data from the database and
return them as XML or JSON data - but I'd love to use Extbase/Fluid for 
this using eID mode.

I'm aware that I could use page types, but it would help me a lot if 
someone could give me a hint on how to use/initialize Extbase/Fluid in 
an eID script.

Thanks a lot,
Thomas


More information about the TYPO3-project-typo3v4mvc mailing list