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
How can I show the description of a subcategory in the main or parent category view ?
-
- Phoca Newbie
- Posts: 9
- Joined: 30 Jan 2021, 01:24
-
- 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 ?
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
I do not speak English. I use the google translator to communicate with you.
https://imgur.com/a/FUsJotg
- Jan
- Phoca Hero
- Posts: 48550
- 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 ?
Hi, unfortunately, subcategory class does not load description, so only override is not enough

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

Jan

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"
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"

Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Newbie
- Posts: 9
- Joined: 30 Jan 2021, 01:24
- Jan
- Phoca Hero
- Posts: 48550
- 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 ?
Ok
If you find Phoca extensions useful, please support the project