[TYPO3-german] Extension als Grundlage nehmen

Jörg Leshel j.leshel at gmail.com
Thu Feb 9 15:19:18 CET 2006


wenn du eine Extentsion im Kickstarter modifizierst überschreibt der
allen Code und lässt nur das grundgeruest stehen

Ich würde eine neue Extension machen.

kuckst du mal hier:
http://typo3.hachmeister.org/index.php?id=137&type=98&L=1&tx_kharticlepages_pi1%5Bprint%5D=1

oder hier: http://www.medienwerke.de/download/typoscript/1182.html


also das wär so ungefähr der minimal code den du brauchst um eine
extensions zu schreiben die Marker in einem Template auswechselt.
musst du im Verzeichnis P1 ins file tx_namerDeinerExtension_p1.php
rein pasten.

title von $row[title]  entspricht dem Namen des Datenbank feldes


function main($content,$conf)   {


  $this->conf=$conf;
  $this->pi_setPiVarDefaults();
  $this->pi_loadLL();
  $content="";
  $marker = array();
  $template = $this->cObj->fileResource($conf["tmpl"]);
  $template = $this->cObj->getSubpart($template, "###BODY_INHALT###");
  $template_referenz = $this->cObj->getSubpart($template, "###REFERENZ###");

 $res = $GLOBALS["TYPO3_DB"]->exec_SELECTquery("*",
"tx_epluseCompare_Data", "deleted = 0 AND hidden = 0",
"productname2");

if (mysql_error())  debug(array(mysql_error(),$query));


        while ($row = mysql_fetch_assoc ($res))
     {

       $marker["###TABLEROWS###"] =$row[title];

        $content
.=$this->cObj->substituteMarkerArrayCached($template_referenz,
$marker);
     }


$content = $this->cObj->substituteSubpart($template, "###REFERENZ###",
$content);
return $content;

  }

}



More information about the TYPO3-german mailing list