Hallo hab ne kleine Extension geschreiben um Produkte in einer Liste auszugeben und bei klick soll die Detailseite kommen - funktioniert auch alles super - nur möchte ich die Detailseite in einer Lightbox aufgehen lassen - funktioniert auch - nur geht in der Lightbox die ganze Seite auf also mit Navi usw. möchte dies aber nicht - wie kann ich das umgehen?
require_once(PATH_tslib.'class.tslib_pibase.php');
/**
* Plugin 'Productlist' for the 'opus_products' extension.
*
* @package TYPO3
* @subpackage tx_opusproducts
*/
class tx_opusproducts_pi1 extends tslib_pibase {
var $prefixId = 'tx_opusproducts_pi1'; // Same as class name
var $scriptRelPath = 'pi1/class.tx_opusproducts_pi1.php'; // Path to this script relative to the extension dir.
var $extKey = 'opus_products'; // The extension key.
var $pi_checkCHash = true;
var $template;
var $id;
/**
* Main method of your PlugIn
*
* @param string $content: The content of the PlugIn
* @param array $conf: The PlugIn Configuration
* @return The content that should be displayed on the website
*/
function main($content,$conf) {
$this->conf=$conf;
$this->pi_setPiVarDefaults();
$this->pi_loadLL();
#ein paar Vorbelegungen
$this->id=$GLOBALS['TSFE']->id;
$this->template=$this->cObj->fileResource('EXT:opus_products/pi1/template.html');
#welche Ansicht?
if($this->piVars['item']) {
$content = $this->detailView();
} else {
$content = $this->listView();
}
return $this->pi_wrapInBaseClass($content);
}
function listView() {
#unser Subpart
$subpart=$this->cObj->getSubpart($this->template,'###LISTVIEW###');
#eine einzelne Reihe
$singlerow=$this->cObj->getSubpart($subpart,'###ROW###');
#Datensätze holen
$res=$GLOBALS['TYPO3_DB']->exec_SELECTquery(
'*', #select
'tx_opusproducts_product', #from
'hidden=0
and deleted=0
and pid='.$this->id.'
and sys_language_uid='.$GLOBALS['TSFE']->sys_language_uid, #where
$groupBy='',
$orderBy='',
$limit='');
//AND b.sys_language_uid='.$GLOBALS['TSFE']->sys_language_uid
if($res) {
$liste='';
while($row=$GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
$markerArray['###LINK###']=$this->pi_linkTP($row['title'],array($this->prefixId.'[item]'=> $row['uid']));
#$markerArray['###LINK###']=$row['title'];
$markerArray['###TEXT###']=$this->pi_RTEcssText($row['description']);
$markerArray['###IMAGE1###']=$this->cObj->IMAGE(array(
'file' => 'uploads/tx_opusproducts/'.$row['image1'],
'file.' => array('maxW' => '110'),
'altText' => $row['title'],
/*'imageLinkWrap' => 1,
'imageLinkWrap.' => array(
'enable' => 1,
'bodyTag' => '<body>',
'wrap' => ' | ',
'JSwindow' => 1,
'JSwindow.' => array(
'newWindow' => 0,
'expand' => '17,20'
),
),*/
));
$markerArray['###IMAGE1###']=$this->pi_linkTP(
$this->cObj->IMAGE(
array(
'file' => 'uploads/tx_opusproducts/'.$row['image1'],
'file.' => array('maxW' => '127'),
'altText' => $row['title'],
)
),array(
$this->prefixId.'[item]'=> $row['uid']
)
);
$liste .= $this->cObj->substituteMarkerArrayCached($singlerow,$markerArray);
}
$subpartArray['###ROW###']=$liste;
} else {
return $this->pi_getLL('nodata');
}
return $this->cObj->substituteMarkerArrayCached($subpart,$markerArray,$subpartArray,array());
}
function detailView() {
#unser Subpart
$subpart=$this->cObj->getSubpart($this->template,'###DETAILVIEW###');
#Datensatz holen
$record=$this->pi_getRecord('tx_opusproducts_product',$this->piVars['item']);
#Marker füllen
$markerArray['###TITLE###']=$record['title'];
$markerArray['###DATUM###']=date('d.m.Y',$record['date']);
$markerArray['###TEXT###']=$this->pi_RTEcssText($record['description']);
$markerArray['###IMAGE1###']=$this->cObj->IMAGE(array(
'file' => 'uploads/tx_opusproducts/'.$record['image1'],
'file.' => array('maxW' => '200'),
'altText' => $row['title'],
));
$markerArray['###LINK###']=$this->cObj->typolink($record['link'],array(
'parameter' => $record['link'],
'extTarget' => '_blank',
));
#backlink als einfachen Link ohne Parameter
$markerArray['###BACKLINK###']=$this->pi_linkToPage($this->pi_getLL('back'),$this->id);
return $this->cObj->substituteMarkerArrayCached($subpart,$markerArray,array(),array());
}
}
?>