Hallo, erstmal vielen dank für dieses tolle Tutorial.
Es hat mir viel geholfen da ich genau sowas nur mit anderen Feldern machen muss.
Leider funktioniert noch nich talles so wie ich mir das wünsche.
Das Hauptproblem ist das nicht im Frontend ausgegeben wird, man sieht zwar im Quelltext die Platzhalter aber Leider keinen Inhalt.
Es wird also richtig ausgegeben, es steht nur nichts drin, obwohl ic schon Datensätze angelegt habe.
Man muss dazu sagen das ich kein Typo 3 Profi bin und von PHP schongar keine Ahnung habe.
Hier mal mein Quelltext:
PHP-Code:
<?php
/***************************************************************
* Copyright notice
*
* (c) 2010 <>
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project is
* free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* The GNU General Public License can be found at
* http://www.gnu.org/copyleft/gpl.html.
*
* This script is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
require_once(PATH_tslib.'class.tslib_pibase.php');
/**
* Plugin 'Contact' for the 'kontakt' extension.
*
* @author <>
* @package TYPO3
* @subpackage tx_kontakt
*/
class tx_kontakt_pi1 extends tslib_pibase {
var $prefixId = 'tx_kontakt_pi1'; // Same as class name
var $scriptRelPath = 'pi1/class.tx_kontakt_pi1.php'; // Path to this script relative to the extension dir.
var $extKey = 'kontakt'; // The extension key.
var $template;
var $id;
var $record;
/**
* The main method of the PlugIn
*
* @param string $content: The PlugIn content
* @param array $conf: The PlugIn configuration
* @return The content that is displayed on the website
*/
function main($content,$conf) {
$this->conf=$conf;
$this->pi_setPiVarDefaults();
$this->pi_loadLL();
t3lib_div::debug('Hier gehts los','test');
#ein paar Vorbelegungen
debug($this->piVars);
$this->id=$GLOBALS['TSFE']->id;
$this->template=$this->cObj->fileResource('EXT:kontakt/template.html');
if($this->piVars['item']) {
$content = $this->detailView();
} else {
$content = $this->detailView();
}
return $this->pi_wrapInBaseClass($content);
t3lib_div::view_array($conf);
}
function detailView() {
#unser Subpart
$subpart=$this->cObj->getSubpart($this->template,'###DETAILVIEW###');
#Datensatz holen
$record=$this->pi_getRecord('tx_kontakt_items',$this->piVars['item']);
t3lib_div::debug($this->tx_kontakt_contact,'tx_kontakt_contact');
#Marker füllen
$markerArray['###NAME###']=$record['name'];
t3lib_div::debug($this->name,'das conf-Array');
$markerArray['###DEKANAT###']=$record['dekanat'];
$markerArray['###FILLIALE###']=$record['filliale'];
$markerArray['###ADRESSE###']=$this->pi_RTEcssText($record['text']);
$markerArray['###TELEFON###']=$record['telefon'];
$markerArray['###FAX###']=$record['fax'];
$markerArray['###EMAIL###']=$record['email'];
$markerArray['###KONTAKT###']=$record['kontakt'];
return $this->cObj->substituteMarkerArrayCached($subpart,$markerArray,array(),array());
if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/kontakt/pi1/class.tx_kontakt_pi1.php']) {
include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/kontakt/pi1/class.tx_kontakt_pi1.php']);
}}}
?>
vielleicht sieht ja einer von Euch den Fehler!
vielen Dank schonmal