Category description in multibox detail view

Phoca Gallery - image gallery extension
jachtarfranko
Phoca Newbie
Phoca Newbie
Posts: 4
Joined: 01 Dec 2014, 14:55

Category description in multibox detail view

Post by jachtarfranko »

Hi,

I would like to make the multibox display the category description. How can i modify default_multibox.php ?

thx
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49144
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Category description in multibox detail view

Post by Jan »

Hi, you need to load the description from categories table - in multibox, all data from Phoca gallery image table are loaded - so you need to customize the sql query.

Jan
If you find Phoca extensions useful, please support the project
jachtarfranko
Phoca Newbie
Phoca Newbie
Posts: 4
Joined: 01 Dec 2014, 14:55

Re: Category description in multibox detail view

Post by jachtarfranko »

Thanks for responding.

Could you tell me the specific changes to code, because you are not confident in php and mysql .

In Multibox, I would like to display the category title and category description.

if i input this code to mutlibox, still dosnt work

Code: Select all

// Category Name Title
if ( $this->tmpl['displaycatnametitle'] == 1) {
	if (isset($this->category->title) && $this->category->title != '') {
		if ($heading != '') {
			$heading .= ' - ';
		}
		$heading .= $this->category->title;
	}
}
// Pagetitle
if ($this->tmpl['showpageheading'] != 1) {
	if ( $heading != '') {
		echo '<h2>' . $heading . '</h2>';
		echo '<h3>' . $this->category->title . '</h3>';
	} 
}
// Category Description
if (isset($this->category->description) && $this->category->description != '' ) {
	echo '<div class="pg-category-view-desc'.$this->params->get( 'pageclass_sfx' ).'">';
	//echo $this->category->description
	echo JHTML::_('content.prepare', $this->category->description)
	.'</div>'. "\n";
}
please help
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49144
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Category description in multibox detail view

Post by Jan »

Hi, unfortunately I didn't do such changes yes, so I don't know what exactly needs to be customized there. You should test if the variable $this->category includes the description (e.g. with print_r($this->category)) and when not, you need to check the model for this view, if it is loaded from database :idea:

Jan
If you find Phoca extensions useful, please support the project
Post Reply