Jommla Seitentitel (Pagetitle) und VirtualMart Categorien

Gepostet am Dezember 10, 2012

Ich hatte das Problem, das ich meine Startseite direkt auf das „Kategorie Layout“ von VirtualMart 2.0.2 gelegt habe. Das Problem ist nun, das der Seitentitel aus den „Einstellungen der Seitenanzeige“ nicht übernommen wurde. Wie folgt kann man das korrigieren oder abändern:

Datei: /components/com_virtuemart/views/category/view.html.php

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
//etwa Zeile 130
/* folgend der Standard */
 
// Set the titles
if ($category->customtitle) {
	 $title = strip_tags($category->customtitle);
} elseif ($category->category_name) {
	 $title = strip_tags($category->category_name);
	 }
else {
	$menus	= $app->getMenu();
	$menu = $menus->getActive();
	if ($menu) $title = $menu->title;
	// $title = $this->params->get('page_title', '');
	// Check for empty title and add site name if param is set
	if (empty($title)) {
		$title = $app->getCfg('sitename');
	}
	elseif ($app->getCfg('sitename_pagetitles', 0) == 1) {
		$title = JText::sprintf('JPAGETITLE', $app->getCfg('sitename'), $title);
	}
	elseif ($app->getCfg('sitename_pagetitles', 0) == 2) {
		$title = JText::sprintf('JPAGETITLE', $title, $app->getCfg('sitename'));
	}
}

geändert in bzw. unten einfach hinzugefügt:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// Set the titles
if ($category->customtitle) {
	 $title = strip_tags($category->customtitle);
} elseif ($category->category_name) {
	 $title = strip_tags($category->category_name);
	 }
else {
	$menus	= $app->getMenu();
	$menu = $menus->getActive();
	if ($menu) $title = $menu->title;
	// $title = $this->params->get('page_title', '');
	// Check for empty title and add site name if param is set
	if (empty($title)) {
		$title = $app->getCfg('sitename');
	}
	elseif ($app->getCfg('sitename_pagetitles', 0) == 1) {
		$title = JText::sprintf('JPAGETITLE', $app->getCfg('sitename'), $title);
	}
	elseif ($app->getCfg('sitename_pagetitles', 0) == 2) {
		$title = JText::sprintf('JPAGETITLE', $title, $app->getCfg('sitename'));
	}
}
 
$app2 =& JFactory::getDocument();
$title = $app2->getTitle();

Tags:

Leave a Reply

 

Posts of Current Category



Facebook: