Page 1 of 1

Categories list "Description"

Posted: 10 Mar 2013, 18:31
by pjbauer
Where is the value set for the "description" field that shows at the top in the users Categories??? The code I am talking about is in components/com_phocadownloads/views/categories/tmpl/default.php

The value is stored as $this->tmpl['description']

When I do a php var_dump, the value for $this->tmpl['description'] is "<div>&nbsp;</div>";

WHERE did THAT come from and where can I change it ???

To further explain... I am using Phoca Downloads at 2 websites.

On one website, I want to add a short description at the top of this categories list that is shown to users. I have been searching for hours (literally) trying to find where that value is set. (Without always having to tweak the code)

On the other website, I want to remove the blank line that shows there (because the value is set to "<div>&nbsp;</div>")

It took me another few hours to figure out how to do that - BECAUSE YOUR trim() FUNCTION DOES NOT WORK. From looking at your code it looks like you think you are checking for a blank description, when in fact it is not blank - because the value assigned to $this->tmpl['description'] always contains the div tags and the non-breaking space entity.

Here is a FIX for that...

Code: Select all

//if ( $this->tmpl['description'] != '') {
$desc = trim(strip_tags($this->tmpl['description']),chr(0xC2).chr(0xA0)); 
if (!empty($desc)) {
Please correct this in the next version so I don't have to keep tweaking the code.

Now if someone could just tell me where I CAN edit this 'description' parameter, if I do want to add a description there????

Thank You.

Re: Categories list "Description"

Posted: 15 Mar 2013, 13:51
by Jan
Hi, there are two possible description fields:

Category description: you can set it in category edit and it will be displayed in Category view
Compnent description: you can set it in Options and it is display in Categories View (this description is set for frontend of the Phoca Download as e.g. introduction)

See:
https://www.phoca.cz/documents/17-phoca- ... parameters
General:
Description - Set description. This will be displayed in Categories View
Jan

Re: Categories list "Description"

Posted: 15 Mar 2013, 16:45
by pjbauer
THANK YOU! (How did I miss that? 8) )