[TYPO3-english] eID method + fluid template

2014-02-11 Thread Sergio Catalá

Good afternoon,

I am using TYPO3 4.5.29 and I built a new extension in Extbase to show 
all my projects in a list.
After building the model, the TCA, the classes and everything, I want a 
filter to show the projects list without rendering the page again.

For that purpose, I use eID method.
I added to ext_localconf.php the eID class, that is pi based (extends 
tslib_pibase), I added the Javascript to load content that this class 
outputs through the main() method.

But now the thing is I would like to render the output in a Fluid template.

My doubts:
1) Is it possible to achieve this?
2) Is it possible to call through eID to a class method that extends 
Extbase instead of pi-based?
I would like to inject, for example, my project repository to be able to 
call fluid viewhelpers like {f:link.action} and {f:image} through fields 
of every project record.


Thanks in advance,
Sergio

___
TYPO3-english mailing list
TYPO3-english@lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english


Re: [TYPO3-english] eID method + fluid template

2014-02-11 Thread Sergio Catalá


I found this wiki article that allowed me to use a fluid template:
https://forge.typo3.org/projects/typo3v4-mvc/wiki/How_to_userender_a_fluid_template_in_a_ServiceeIdCLI_Script2

Now my problem would be inserting a repository and not using database 
low-level records like this:


$projects = $GLOBALS['TYPO3_DB']-exec_SELECTquery(
'uid, title',
'tx_myextension_domain_model_project',
$where);

I would like to use in a pi-based class:

$projects = $this-projectRepository-findAll();

Is it possible?

If not, is it possible to call to an eID method that is based on Extbase 
instead of pi-based?


Thanks in advance,
Sergio


On 11/02/14 15:49, Sergio Catalá wrote:

Good afternoon,

I am using TYPO3 4.5.29 and I built a new extension in Extbase to show 
all my projects in a list.
After building the model, the TCA, the classes and everything, I want 
a filter to show the projects list without rendering the page again.

For that purpose, I use eID method.
I added to ext_localconf.php the eID class, that is pi based 
(extends tslib_pibase), I added the Javascript to load content that 
this class outputs through the main() method.
But now the thing is I would like to render the output in a Fluid 
template.


My doubts:
1) Is it possible to achieve this?
2) Is it possible to call through eID to a class method that extends 
Extbase instead of pi-based?
I would like to inject, for example, my project repository to be able 
to call fluid viewhelpers like {f:link.action} and {f:image} through 
fields of every project record.


Thanks in advance,
Sergio

___
TYPO3-english mailing list
TYPO3-english@lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english


___
TYPO3-english mailing list
TYPO3-english@lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english


Re: [TYPO3-english] eID method + fluid template

2014-02-11 Thread Jigal van Hemert

Hi,

On 11-2-2014 15:49, Sergio Catalá wrote:

After building the model, the TCA, the classes and everything, I want a
filter to show the projects list without rendering the page again.
For that purpose, I use eID method.


The eID calls were meant as a light weight method to retrieve 
information from the server. For example to get information for an 
auto-complete field.


This is the reason why you have to initialize the database connection, 
initialize the frontend user, etcetera if you need them. All to keep the 
basic eID script as light weight and fast as possible.


If you want to render content or parts of pages it would be far easier 
to implement a new page type which doesn't output the normal head part, 
body tag, etcetera.


Just use TypoScript to define a new PAGE object, set a different type 
number for it, configure it to output only content and you're in business.
The JavaScript can just call a page with your new type number and you'll 
get the output you want.


--
Jigal van Hemert
TYPO3 CMS Active Contributor

TYPO3  inspiring people to share!
Get involved: typo3.org
___
TYPO3-english mailing list
TYPO3-english@lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english