0

I need to include a PHP file (containing some database-checks 'n' stuff) into a very bad programmed TYPO3 website. They used TemplaVoilà for templating purposes. This is the definition in the master TypoScript template:

[...]
page = PAGE
page {
    [...]
    10 = USER
    10.userFunc = tx_templavoila_pi1->main_page
    [...]
}
[...]

Within the used TemplaVoilà template they mapped the main content div (where I'd like to insert my PHP script) with the attribute „field_content“. Don't know if this helps to answer my question.

I tried nearly everything I know to somehow overwrite/fill the „Main Content Area“ through TypoScript, as it is completly empty () on the page I created for my PHP file.

Is it possible to fill a specific mapped tag with my PHP file through TypoScript?

(TYPO3 Version 4.5.32)

I figured out a solution for my problem: With the hint in the answer by Urs (using _INT) I altered an already included DS object to be extended through additional sub-objects (as the markup allows my code to be placed there with some modifications to the stylesheet):

lib.social.20 = PHP_SCRIPT_INT
lib.social.20.file = fileadmin/path_to_my_file

Now it works like a charm althrough it's a bit hacky...

Sven Finger
  • 543
  • 3
  • 11
  • Would be useful if you posted the code you tried already – Urs Dec 10 '14 at 09:10
  • I tried thousands of things like changing the XML, TemplaVoilà settings and stuff. So there is no simple code I could've written into or explained in my question and imho it wouldn't help someone to answer it. – Sven Finger Dec 10 '14 at 14:58

1 Answers1

0

What about

lib.myscript= USER
lib.myscript {
  userFunc =user_myScript->main
}

and in the DS

<TypoScript><![CDATA[
10 < lib.myscript
]]></TypoScript>  

I'm no TemplaVoilà expert, I just pulled the second snippet from http://typo3-beispiel.net/index.php?id=10

PS: if its's USER, it will be cached, if it's USER_INT, it will prevent static file caching. So you may be better off running those checks in the background via AJAX?

Urs
  • 4,984
  • 7
  • 54
  • 116
  • Sorry, but this answer makes no sense to me at all. As I am not an expert in TYPO3 I can't tell that for sure, but to me it seems like this would be killing the whole TemplaVoilà object. I need to overwrite/fill a specific DS object from the extension TypoScript on my specific page. – Sven Finger Dec 10 '14 at 15:19
  • did you check the source on the link above? no sense either? – Urs Dec 10 '14 at 16:06