[Typo3-UG Denmark] Preg on page output

Jeppe Vesterbaek jhve02 at control.auc.dk
Mon Nov 29 08:33:10 CET 2004


Hi

I am currently working on my first Typo3 website - almost done, though I 
have little question that I cannot work out myself. I have a PHP-script, 
I want to use for syntaxt highligthing and indenting some source code. I 
have created a frontend extension and added my syntax highligthing as a 
page content type. I works great. '

I would, however, like to use the syntax highligther in a normal "text" 
(RTE) content type and just mark the code, I want highligthed with 
<MYCODE> some code here </MYCODE>. My idea was just to make a 
preg_replace on the page output, grap all the <MYCODE> / </MYCODE> tags 
and replace the contents between the tags.

Problem: How do I get a hold of the page contents? Atm. it is stored in 
"page.10 < temp.MainTemplate" like explained in the modern template 
building tutorial.

Pheew, a long post. Hope you understand it.
/Jeppe, Denmark



More information about the TYPO3-UG-denmark mailing list