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 »

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 »

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: 47887
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 »

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 »

Thank you. The problem has been resolved.

https://imgur.com/a/AuzHL9p
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47887
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 »

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