[Typo3-dev] substituteMarkerArray in BE module
Peter Klein
peter at umloud.dk
Thu Oct 27 14:19:45 CEST 2005
"Jerome" <jerome at jerome.net> skrev i en meddelelse
news:mailman.1.1130332619.11245.typo3-dev at lists.netfielders.de...
> 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);
> }
>
>
Hi Jerome thanks for your reply..
That's the same conclusion I came to..
--
Peter Klein/Umloud Untd
More information about the TYPO3-dev
mailing list