Phoca Seal

Categories list "Description"

Categories list "Description"

Postby pjbauer on 10 Mar 2013, 18:31

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.
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 10 Mar 2013, 17:58

Google Ads

Re: Categories list "Description"

Postby Jan on 15 Mar 2013, 13:51

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: ... parameters
Description - Set description. This will be displayed in Categories View
If you find some Phoca extensions useful, please vote for them on:
User avatar
Phoca Hero
Phoca Hero
Posts: 34998
Joined: 10 Nov 2007, 18:23
Location: Czech Republic

Return to Phoca Download

Who is online

Users browsing this forum: Google [Bot] and 1 guest