[Typo3-dev] substituteMarkerArray in BE module

Jerome jerome at jerome.net
Wed Oct 26 15:12:00 CEST 2005


Hello Peter

I had to do the same once,
So I made my own parseTemplate function for BE use :

function parseTemplate($tempUrl, $tempMarker, $aTags = array())
{
    // $tempUrl : the path of the template for use with t3lib_div::getUrl()
    // $tempMarker :  the template subpart marker
    // $aTags : the marker array for substitution

    $templateCode = t3lib_div::getUrl($tempUrl);
    $template = t3lib_parsehtml::getSubpart($templateCode, $tempMarker);

    reset($aTags);

    while(list($tag, $valeur) = each($aTags))
    { $template = str_replace($tag, $valeur, $template);}

    return ereg_replace("###[a-zA-Z0-9_]*###", "", $template);
}


Hope this helps

Jérôme Schneider
Typo3 Ameos
typo3dev at ameos.com


"Peter Klein" <peter at umloud.dk> a écrit dans le message de news: 
mailman.1.1130331396.7755.typo3-dev at lists.netfielders.de...
> Hi list. I need to process a HTML template from a BE module, and was 
> wondering if there's a way to use the " substituteMarkerArray" function in 
> a BE module? Or is there something similar for BE?
>
> -- 
> Peter Klein/Umloud Untd
>
> 






More information about the TYPO3-dev mailing list