Page 1 of 1

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

Posted: 30 Jan 2021, 01:32
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

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

Posted: 31 Jan 2021, 04:56
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

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

Posted: 31 Jan 2021, 21:21
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

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

Posted: 01 Feb 2021, 19:00
by bajawebmaster
Thank you. The problem has been resolved.

https://imgur.com/a/AuzHL9p

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

Posted: 02 Feb 2021, 14:11
by Jan
Ok