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

Stefan Isak stefanisak at googlemail.com
Sat Dec 11 13:24:57 CET 2010


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.

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.

Cheers
Stefan


On 11.12.2010, at 02:42, Thomas Thasmo Deinhamer wrote:

> Hello folks!
> 
> I'd like to output some JSON or XML to use with flash
> and thought of using eID to do so. Now I'm wondering how
> it's possible to use the whole Extbase/Fluid MVC inside
> a eID script.
> 
> Is it possible - maybe with the new dispatcher in 1.3?
> 
> Or would it be better to use a separate page type and
> include a dedicated plugin rendering the JSON/XML?
> 
> I'd prefer using eID because it seems cleaner to me.
> Page types fit perfectly for output variations of
> a page like a print view or a pdf view but I need
> to return specific JSON/XML based on requests.
> 
> It would be cool if someone of you could help me
> out and post some lines of code.
> 
> I thought of just registering a plugin in the ext_tables.php,
> configuring it in the ext_localconf.php and then somehow
> calling it inside the eID script.
> 
> Unfortunately I'm not sure how this can be done with
> support for autoloading classes and also the full
> functionality of repositories and Fluid.
> 
> Thanks a lot for help,
> Thomas
> _______________________________________________
> TYPO3-project-typo3v4mvc mailing list
> TYPO3-project-typo3v4mvc at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc



More information about the TYPO3-project-typo3v4mvc mailing list