[TYPO3-dev] Best practice to implement BE-preprocessing in a FE plugin

Dmitry Dulepov dmitry at typo3.org
Wed Jul 4 16:12:28 CEST 2007


Hi!

Taras Sajuk wrote:
> I have a frontend plugin which takes a XML file and produces a nice
> output. The plugin also uses a "page" parameter in the URL: the
> content displayed can be different for different values of the [page]
> parameter going from 1 ... n. The maximum value n is dependent on the
> number of page entries in the xml file.
> It takes quite a time (several secs real time) for the plugin to
> display the content. Unfortunately  the plugin has to run through the
> full XML file each time to display one page. As an example if n=100
> you get several hunderds of secs runtime to fill the cache.If you have
> several 100's of pages holding such a plugin, you are dead if your
> page cache gets cleared. That's the nightmare I'm just experiencing
> now :-(
> On top of that you can't compute a googlesitemap as you don't have the
> number of "subpages" the plugin generates in a database table.
> 
> That's why I just wanted a way to compute the html output of the
> plugin just after the editor enters the filename in the BE and to
> store this output in a plugin specific table. If the page holding the
> plugin is then called up (FE), the plugin just has to copy some data
> from his database table to $content.

I see. Now it is clear.

The only way that I see is to spawn a dedicated command line process 
that will do it for you. You may want to look into typo3 docs [1] for 
the description of command line interface to typo3. Once visitors 
uploads a file, this tool is spawned and processes the file. FE 
extension can display something like "not rendered yet" if there is not 
data in table (=until xml is processed).

[1] 
http://typo3.org/documentation/document-library/core-documentation/doc_core_inside/4.1.0/view/3/5/#id3561750

-- 
Dmitry Dulepov
TYPO3 freelancer / TYPO3 core team member
Web: http://typo3bloke.net/
Skype: callto:liels_bugs




More information about the TYPO3-dev mailing list