[TYPO3-commerce] Using category nav title

Karsten Dambekalns karsten at typo3.org
Tue Aug 28 21:33:31 CEST 2007


Hi.

Ingo Schmitt wrote:
>> In the template for pi1 I have in the subpart for 
>> ###CATEGORY_VIEW_DISPLAY### the marker ###CATEGORY_TITLE###. Is it 
>> possible to have the navtitle here, if - and only if - it is set?
>>
> as every Marker is wrapped with stdWrap you could implement it by TS, 
> but I would implement a small hook..

Here is my hook, if anyone needs it:

function postinit(&$category) {
	$category->load_data();
	if(strlen($category->get_navtitle())) {
		$category->title = $category->get_navtitle();
	}
}

Goes into 
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['commerce/lib/class.tx_commerce_category.php']['postinit']

The only thing missing in the category object are setter methods. :)

Karsten


More information about the TYPO3-project-commerce mailing list