How to remove "Category >>" when view subcategories?

Phoca Gallery - image gallery extension
hominid4
Phoca Member
Phoca Member
Posts: 12
Joined: 16 Nov 2009, 23:39

How to remove "Category >>" when view subcategories?

Post by hominid4 »

When viewing the categories as a list and when it shows a category with a subcategory it displays it as:

Category >> Subcategory

Is it possible to remove the "Category >> " and just have the subcategory name?

Thanks,
Wesley
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49144
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: How to remove "Category >>" when view subcategories?

Post by Jan »

Hi, check parameters basic and parameters system in menu link to gallery, you can make some settings regarding titles and breadcrumbs.

Jan
If you find Phoca extensions useful, please support the project
hominid4
Phoca Member
Phoca Member
Posts: 12
Joined: 16 Nov 2009, 23:39

Re: How to remove "Category >>" when view subcategories?

Post by hominid4 »

Hi, I'm sorry, I've tried all the variations I can think of but am unable to get it to work. I have a category called '2009', and for an example I have a subcategory called 'Las Vegas Vacation'. For menu type I have "Phoca Gallery Category List Layout" selected and have the '2009' category hidden and display subcategories visible, so it just shows all the subcategories of '2009'.

So when I click on my photo gallery link it shows a list of subcategories as:
2009 >> Las Vegas Vacation

Could you please tell me which setting I set in my Menu parameters to show only 'Las Vegas Vacation' without the "2009 >> "?

Thanks!,
Wesley
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49144
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: How to remove "Category >>" when view subcategories?

Post by Jan »

Hi, there is no such option :( , as the categories are created by tree, so they includes parent category. So such behaviour needs to be customized in the code, so you will customize the recursive function which displays the categories, see model of categories view.

Jan
If you find Phoca extensions useful, please support the project
marcel
Phoca Newbie
Phoca Newbie
Posts: 4
Joined: 19 Feb 2010, 13:17

Re: How to remove "Category >>" when view subcategories?

Post by marcel »

Hello Jan,

I am having the same problem. Which file i have to customize to remove the parent categoryname.

regards
marcel
Jan wrote:Hi, there is no such option :( , as the categories are created by tree, so they includes parent category. So such behaviour needs to be customized in the code, so you will customize the recursive function which displays the categories, see model of categories view.

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

Re: How to remove "Category >>" when view subcategories?

Post by Jan »

Hi, see:
components\com_phocagallery\models\categories.php

Jan
If you find Phoca extensions useful, please support the project
shock
Phoca Newbie
Phoca Newbie
Posts: 1
Joined: 22 Oct 2016, 07:13

Re: How to remove "Category >>" when view subcategories?

Post by shock »

Hi Jan, a long time, but it is my turn to open this old thread. I have the same problem today in 2016. I am reviewing components \ com_phocagallery \ models \ categories.php but I can not figure it out.

Do you have any suggestion?

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

Re: How to remove "Category >>" when view subcategories?

Post by Jan »

Hi, see the function function _categoryTree( $data, $tree, $id = 0, $text='', $currentId) {

The $show_text = $text . $key->title; gets the text of the category tree, so there should be done a customized if clause to handle the text for your needs.

Jan
If you find Phoca extensions useful, please support the project
Post Reply