Page 2 of 2

Re: category title is not centered

Posted: 10 May 2017, 22:01
by MachDirEinBild
Ich hab jetzt nochmal was probiert und das sieht erstmal ganz gut aus.
Allerdings habe ich dazu am Code etwas ändern müssen, was im Bezug auf spätere Updates nicht schön ist.
Vielleicht gibt es ja da auch noch eine andere Möglichkeit ohne Codeänderung.

In der Datei components\com_phocagallery\views\category\tmpl\default.php habe ich eine Zeile weiter nach hinten geschoben.

Code: Select all

<?php
defined('_JEXEC') or die('Restricted access'); 
// Alex: original
// echo '<div id="phocagallery" class="pg-category-view'.$this->params->get( 'pageclass_sfx' ).' pg-cv">';
// Alex: original

// Heading
$heading = '';



if ($this->params->get( 'page_heading' ) != '') {
	$heading .= $this->params->get( 'page_heading' );
}

// Category Name Title
if ( $this->tmpl['display_cat_name_title'] == 1) {
	if (isset($this->category->title) && $this->category->title != '') {
		if ($heading != '') {
			$heading .= ' - ';
		}
		$heading .= $this->category->title;
	}
}
// Pagetitle
if ($this->tmpl['show_page_heading'] != 0) {
	if ( $heading != '') {
		echo '<div class="page-header"><h1>'. $this->escape($heading) . '</h1></div>';
	} 
}

// Alex: neu
echo '<div id="phocagallery" class="pg-category-view'.$this->params->get( 'pageclass_sfx' ).' pg-cv">';
// Alex: neu

if (isset($this->category->id) && (int)$this->category->id > 0) {
	
	echo '<div id="pg-icons">';
	echo PhocaGalleryRenderFront::renderFeedIcon('category', 1, $this->category->id, $this->category->alias);
	echo '</div>';
	
}
echo '<div style="clear:both"></div>';
Ich habe bei mir bis jetzt noch nicht feststellen können, das dadurch etwas nicht mehr funktioniert.
Aber falls es da Bedenken gibt, lasst es mich bitte wissen. :|


Gruß, Alex.