[TYPO3-english] Markers for bodytext field

Tapio Markula tapio.markula at xetpoint.fi
Tue Nov 18 13:29:10 CET 2008


Tyler Kraft kirjoitti:
> Tapio,
> 
> You can't so anything like that with SHORT or with constants because 
> they are just strings. So you'll have to do the whole thing with a user 
> function I think.
> 
> 
> 
> Tapio Markula wrote:
>> Tyler Kraft kirjoitti:
>>> write your own little parseFunc str_replace then...

ok works fine. I tested

includeLibs.hsme_string = fileadmin/ext-templates/user_myreplace.inc
tt_content.text.20 {
    parseFunc {
    userFunc=user_myreplace->user_myreplace
    }
    }
}

with

<?php
class user_myreplace{
     function user_myreplace($content="",$conf=array()) {
         $content=str_replace('[myreplace]','replace with this 
text',$content);
         return $content;
     }
}
?>

the $conf array was empty - how to define config in this case or in 
general for user functions?

I debugged $TSFE in order to know, what is available using that.
Seems that TS config just for root page available and it is not parsed 
as an array. Not very usable as config.


More information about the TYPO3-english mailing list