Edit automatically generated name of subcategory

Phoca Gallery - image gallery extension
get12
Phoca Newbie
Phoca Newbie
Posts: 7
Joined: 25 Dec 2011, 21:59

Edit automatically generated name of subcategory

Post by get12 »

Hello,

I am trying to find a way to edit the automatically generated name of subcategory.

I mean, by default, when you create a subcategory, it's name is generated in the following way:
Events-event1
I want to remove the category name (events), so that it becomes just subcategoryname (event1)

Is it possible?

Thank you
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49149
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Edit automatically generated name of subcategory

Post by Jan »

Hi, subcategory is called only as it should but in tree it is displayed with parent category. To hide parent category, this needs to be modified in the code.

Jan
If you find Phoca extensions useful, please support the project
Artemis909
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 16 Feb 2010, 09:02

Re: Edit automatically generated name of subcategory

Post by Artemis909 »

Edit file components\com_phocagallery\views\categories\tmpl\default_catimg.php (if you are using category and image setting)

echo '</a></div></td>';
//echo '<td><a href="'.$this->categories[$i]->link.'">'.$this->categories[$i]->title.'</a>&nbsp;'; -with category parent name
echo '<td><a href="'.$this->categories[$i]->link.'">'.$this->categories[$i]->title_self.'</a> '; //without parent name

if ($this->categories[$i]->numlinks > 0) {echo '<span class="small">('.$this->categories[$i]->numlinks.')</span>';}
Post Reply