Page 1 of 2
Description for all categories and subcategories
Posted: 10 May 2010, 22:14
by gdX
How to show description for each category in the list of categories?
[image]
category name
category description
Re: Description for each category in the list of categories
Posted: 10 May 2010, 22:25
by Benno
Re: Description for each category in the list of categories
Posted: 10 May 2010, 23:46
by gdX
Yes, it's a decision I have tried.
But it works in the root category.
And how is implemented in the internal categories?
Re: Description for each category in the list of categories
Posted: 11 May 2010, 07:52
by Benno
Hi,
Yes, it's a decision I have tried.
But it works in the root category.
I thought, that was your question.
Kind regards,
Benno
Re: Description for each category in the list of categories
Posted: 11 May 2010, 10:15
by gdX
Benno wrote:I thought, that was your question
The objective was to show the descriptions in sub-categories.
Re: Description for each category in the list of categories
Posted: 11 May 2010, 18:38
by Benno
Hi,
The objective was to show the descriptions in sub-categories.
See documentation:
https://www.phoca.cz/documents/2-phoca-g ... categories
Fill in the description which appears above the images in the Category View
Kind regards,
Benno
Re: Description for each category in the list of categories
Posted: 12 May 2010, 05:51
by GenkaiNashi
Hey,
I suggest using a template override for com_phocagallery/views/category/tmpl/default_categories.php -
Add this:
Code: Select all
echo $this->itemscv[$i]->description;
after:
Code: Select all
if ($this->itemscv[$i]->numlinks > 0) {echo '<span class="small">('.$this->itemscv[$i]->numlinks.')</span>';}
If you don't know what a template override is ask here.
Re: Description for each category in the list of categories
Posted: 18 May 2010, 16:49
by gdX
Hello again!
Thanks for the help, but I can not display the description for all sub-categories.
I'm on the site are three levels of subcategories.
I wish for all levels of output description.
For the root of categories is displayed, but not nested.
Information displays the file com_phocagallery/views/category/tmpl/default.php
This file is a block:
Code: Select all
if ($value->type == 1) {
if ($value->displayname == 1 || $value->displayname == 2) {
echo '<div class="phocaname" style="font-size:'.$this->tmpl['fontsizename'].'px"><a href="'.$value->link.'">'.PhocaGalleryText::wordDelete($value->title, $this->tmpl['charlengthname'], '...').'</a></div>';
echo '<div class="phocaname" style="font-size:'.$this->tmpl['fontsizename'].'px"><a href="'.$value->link.'">'.PhocaGalleryText::wordDelete($value->description, $this->tmpl['charlengthname'], '...').'</a></div>';
}
}
It displays the category name ($value->title).
I tried to change $value->title for $value->description, but description is not shown.
Strangely, if I write echo $value->title; or echo $value->alias; or echo $value->userfolder; the value shown.
But not a description (echo $ value-> description;)
Why is this happening, if they are in one table?
Re: Description for all categories and subcategories
Posted: 30 May 2010, 15:22
by Jan
Hi, check if the description column is loaded from the database (check the whole $value variable)
Jan
Re: Description for all categories and subcategories
Posted: 20 Mar 2013, 13:44
by stian
Hello. I have - I have a problem - I need to take out a description of subcategories. Phocagallery can allow to take out only in the parent category. I tried to change in the file default_categories.php
echo '<p>'. $ this-> itemscv [$ i] -> description. '</ p>'; - and there is no result and
echo $ this-> categories [$ i] -> description; - no result
Suggest please the file (controller?) which describes itemscv and where there is a query to the base for a selection of fields. default does not help. thanks. What the file view.html.php com_phocagallery_v3.2.3\site\views\category\ ??