[TYPO3-shop] Pages as Categories

Ryan Hayle rd.typo3 at hayle.org
Sat Dec 9 00:31:15 CET 2006


On Wed, 06 Dec 2006 08:27, Franz Holzinger wrote:
> This comes from the single view class. Maybe you can provide a patch 
> for that.

Hi Franz,
This wasn't actually the source of my problem, it was in the category 
model.  I modified getMarkerArray in 
model/class.tx_ttproducts_category.php around line 350 like so:

function getMarkerArray (&$markerArray, &$page, $category, $pid, $imageNum=0, $imageRenderObj='image', &$viewCatTagArray, $forminfoArray=array(), $pageAsCategory=0, $code, $id, $prefix, $linkWrap='')	{
	$row = ($category ? $this->get($category) : array ('title' => '', 'pid' => $pid));

		// Get image
	$this->image->getItemMarkerArray ($row, $markerArray, $row['pid'], $imageNum, $imageRenderObj, $viewCatTagArray, $code, $id, $prefix, $linkWrap);
	$pageCatTitle = '';
	if ($pageAsCategory == 1) {
		$pageTmp = $page->get($pid);
>		$pageCatTitle =  $row['title'] ? $pageTmp['title'].$this->conf['categorySeparator'] : $pageTmp['title'];
	}

	$catTitle = $pageCatTitle.($row['title']);
	$this->setMarkerArrayCatTitle ($markerArray, $catTitle, $prefix);
	parent::getItemMarkerArray ($row, $markerArray, $code, $prefix);
}


Then I set plugin.tt_products.categorySeparator = / in my template 
setup.  This way people can define how they want to display 
sub-categories, etc.  You might want to add it to the constants, etc.

Cheers,
Ryan


More information about the TYPO3-project-tt-products mailing list