How can I show the description of a subcategory in the main or parent category view ?

Phoca Download - download manager
bajawebmaster
Phoca Newbie
Phoca Newbie
Posts: 9
Joined: 30 Jan 2021, 01:24

How can I show the description of a subcategory in the main or parent category view ?

Post by bajawebmaster » 30 Jan 2021, 01:32

How can I show the description of a subcategory in the main or parent category view ?. Since I am override the layout and I would like to show the description.

https://imgur.com/a/JPED6ZH

bajawebmaster
Phoca Newbie
Phoca Newbie
Posts: 9
Joined: 30 Jan 2021, 01:24

Re: How can I show the description of a subcategory in the main or parent category view ?

Post by bajawebmaster » 31 Jan 2021, 04:56

Hello I am override the design of showing the List of files of a category in phocadownload, When entering the subcategories are shown all good until there. But I can't get the description of each subcategory displayed, I would like it to be displayed in the section marked with the black rectangle. If I enter the subcategory if you show me your description.

I do not speak English. I use the google translator to communicate with you.

https://imgur.com/a/FUsJotg

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

Re: How can I show the description of a subcategory in the main or parent category view ?

Post by Jan » 31 Jan 2021, 21:21

Hi, unfortunately, subcategory class does not load description, so only override is not enough
Image

Even model needs to be changed:
components\com_phocadownload\models\category.php
line cca 222
FROM:

Code: Select all

$query = " SELECT  cc.id, cc.title, cc.alias, cc.access as cataccess, cc.accessuserid as cataccessuserid, COUNT(c.id) AS numdoc"
TO:

Code: Select all

$query = " SELECT  cc.id, cc.title, cc.alias, cc.access as cataccess, cc.accessuserid as cataccessuserid, COUNT(c.id) AS numdoc, cc.description"
Image

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

bajawebmaster
Phoca Newbie
Phoca Newbie
Posts: 9
Joined: 30 Jan 2021, 01:24

Re: How can I show the description of a subcategory in the main or parent category view ?

Post by bajawebmaster » 01 Feb 2021, 19:00

Thank you. The problem has been resolved.

https://imgur.com/a/AuzHL9p

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

Re: How can I show the description of a subcategory in the main or parent category view ?

Post by Jan » 02 Feb 2021, 14:11

Ok
If you find Phoca extensions useful, please support the project

Post Reply