Description for all categories and subcategories

Phoca Gallery - image gallery extension
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49144
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Description for all categories and subcategories

Post by Jan »

Hi, try to see:
components\com_phocagallery\models\category.php

method: function getSubCategory() {

and add cc.description to the sql query (not sure if this help as I am not on my pc to test it)

Jan
If you find Phoca extensions useful, please support the project
stian
Phoca Newbie
Phoca Newbie
Posts: 5
Joined: 20 Mar 2013, 13:37

Re: Description for all categories and subcategories

Post by stian »

Jan wrote:Hi, try to see:
components\com_phocagallery\models\category.php

method: function getSubCategory() {

and add cc.description to the sql query (not sure if this help as I am not on my pc to test it)

Jan

Thank you very much! For you and for everybody:
To display the description in the subcategory:
Step 1: In the file models\category.php in the section

/ *
* SUB CATEGORIES
* /
add to the request cc.description
$ query = 'SELECT cc.id, cc.title, cc.alias, cc.published, cc.approved, cc.parent_id, cc.deleteuserid, cc.accessuserid, cc.uploaduserid, cc.access, cc.description, a.filename, a.extm, a.exts, a.extw, a.exth, a.extid '

Next in the file views/category/tmpl/default_categories.php write in the right place

echo'<p>'.$this->itemscv[$i]->description.'</ p>';
and everything is works.
Thanks alot for all of you, and php. (in theory we can display different fields and basis, giving aliases through AS aliasname and linking the tables)
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49144
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Description for all categories and subcategories

Post by Jan »

Hi, thank you for the guide.

Jan
If you find Phoca extensions useful, please support the project
Marianna
Phoca Newbie
Phoca Newbie
Posts: 1
Joined: 14 May 2015, 16:21
Location: Ukraine
Contact:

Re: Description for all categories and subcategories

Post by Marianna »

unfortunately it does not work, the description in the subcategory does not appear :( 4 days I am looking for and can not find solutions :cry:
Post Reply