[Typo3-dev] Template Marker Bug

Daniel Pötzinger operation-lan at gmx.de
Sun May 1 20:26:11 CEST 2005


Chi Hoang wrote:
> Hello list,
> 
> there is an error in the template engine. In the example the marker 
> ###EVENTNAME### get replaced but some rest of the marker are still in 
> $content (<h4>blabla##EEVENTNAME###</h4> for example). This happens only 
> if the marker is following directly the next line of the template marker 
> ###GUESTLIST_PDF###.
> 
> Greets,
> 
> Chi
> 
> Example:
> 
> // Get the parts out of the template
> $template = array();
> $template["total"] = 
> $this->cObj->getSubpart($this->templateCode,"###GUESTLIST_PDF###");
> 
> $subpartArray = array();
> $subpartArray["###EVENTNAME###"] = "blabla"];
> 
> $content = 
> $this->cObj->substituteMarkerArrayCached($template["total"],array(), 
> $subpartArray, array());
> 
> Template:
> 
> <!-- ###GUESTLIST_PDF### -->
>     <h4>###EVENTNAME###</h4>
> <!-- ###GUESTLIST_PDF### -->

Hmm Why dont you use Markerarray for that?
$markerArray=array();
$markerArray["###EVENTNAME###"] = "blabla";
...substituteMarkerArrayCached($template["total"],$markerArray,$subpartArray, 
array());

Greetings






More information about the TYPO3-dev mailing list