简体   繁体   中英

Migrate php application to typo3

I have a complex php application which I want to include in a typo3 page. I allready found something like this:

page.headerData.20 = PHP_SCRIPT_EXT
page.headerData.20.file = fileadmin/phpScript.inc

...but this inserts the file to template, I just want to show it on one single page instead of content. The application is currently included as an iFrame (same domain) but that's not the best way because the window doesn't resize.

In also think abouth to convert the whole app to typo3 plugin, but I'm very new to typo3 so I don't now how to start. Is there a guide for converting plain php to typo3 plugin?

Hi you can use a simple user extension.

Some where in Typoscript Setup:

includeLibs.mystuff = path_to_file/my_user_class.php
lib.mystuff = USER_INT
lib.mystuff {
 userFunc =user_myclassname->main
 var_to_pass_at_class=test
}

-- Now you can replace the subpart with dynamic content (depends on your TYPO3 configuration) +- page.10.subparts.CONTENT<lib.mystuff

-- File: my_user_class.php

<?php
class user_myclassname {
    function main($content,$conf){
        global $TSFE;
        return $conf['var_to_pass_at_class']; //returns test
    }
}   

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM