Hi, yes, this is a feature - detail of an image or images in category are displayed by Phoca Gallery component. If you are going from content to Phoca Gallery, then the system of Phoca Gallery works there (back link is going to categories view).
So this must be customized - you need to modify the link back and hardcode the backlink to your article. (This cannot be set as default in Phoca Gallery, as Phoca Gallery does not know from which article and which link can be clicked by user)
Jan
Back button redirect to article
- Jan
- Phoca Hero

- Posts: 49297
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Back button redirect to article
If you find Phoca extensions useful, please support the project
-
hockey2112
- Phoca Member

- Posts: 24
- Joined: 28 Jul 2009, 03:41
Re: Back button redirect to article
Jan wrote:Hi, yes, this is a feature - detail of an image or images in category are displayed by Phoca Gallery component. If you are going from content to Phoca Gallery, then the system of Phoca Gallery works there (back link is going to categories view).
So this must be customized - you need to modify the link back and hardcode the backlink to your article. (This cannot be set as default in Phoca Gallery, as Phoca Gallery does not know from which article and which link can be clicked by user)
Jan
Jan,
Can you please elaborate on which code/file I need to modify to hard-code the gallery view's back button? I need it to point back to an article.
Thanks!
- Jan
- Phoca Hero

- Posts: 49297
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Back button redirect to article
Hi, this is in fact in different files.
e.g. you need to check the template of category view (where the images boxes are displayed) but the view.html.php too.
In model of the category view there the links are loaded from database.
in view.html.php - there will be decieded if the box will be: image, or subcategory, or backlink to categories view. so try to open:
components/com_phocagallery/views/category/view.html.php and find the link back to categories view and change the link there.
Jan
e.g. you need to check the template of category view (where the images boxes are displayed) but the view.html.php too.
In model of the category view there the links are loaded from database.
in view.html.php - there will be decieded if the box will be: image, or subcategory, or backlink to categories view. so try to open:
components/com_phocagallery/views/category/view.html.php and find the link back to categories view and change the link there.
Jan
If you find Phoca extensions useful, please support the project
-
hockey2112
- Phoca Member

- Posts: 24
- Joined: 28 Jul 2009, 03:41
Re: Back button redirect to article
Jan wrote:Hi, this is in fact in different files.
e.g. you need to check the template of category view (where the images boxes are displayed) but the view.html.php too.
In model of the category view there the links are loaded from database.
in view.html.php - there will be decieded if the box will be: image, or subcategory, or backlink to categories view. so try to open:
components/com_phocagallery/views/category/view.html.php and find the link back to categories view and change the link there.
Jan
Jan,
Thanks for the reply, but I am still a bit lost. I checked these files and made some changes, but it did not do what I wanted it to do (it seemingly did not do anything, actually):
components/com_phocagallery/models/category.php
I couldn't find anything referring to the "back" link in this file.
components/com_phocagallery/views/category/view.html.php
I changed all of the links listed in this file to the article page link ("photo-gallery") and nothing changed.
Maybe I am misunderstanding what to change or which file(s) to change. Can you please elaborate a bit? Better yet, if you could point me to the actual line items in each file, that would be awesome!
Just to be sure I am completely clear in what I want to do...
1. The gallery itself has the URL mysite.com/gallery
2. The article I want to link the back button to is mysite.com/photo-gallery
3. On the mysite.com/photo-gallery article page, I have a photo menu I created myself and each photo menu item links to a phoca category (for instance, mysite.com/gallery/category/1-bouquets). The back button on mysite.com/gallery/category/1-bouquets (and the other phoca category pages) needs to link back to mysite.com/photo-gallery instead of to mysite.com/gallery
Thanks!
- Jan
- Phoca Hero

- Posts: 49297
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Back button redirect to article
Hi, here:
components\com_phocagallery\views\category\view.html.php
e.g.
Here you can see the backlink, so you need to customize it (but cannot say it is 100%, I am not on my PC so cannot test it)
Jan
components\com_phocagallery\views\category\view.html.php
e.g.
Code: Select all
// ----------------------------------------
// PARENT FOLDERS(I) or Back Button STANDARD
// ----------------------------------------
$posItemid = $posItemidNull = $backLinkItemId = false;
$backLink = PhocaGalleryRoute::getCategoriesRoute();Jan
If you find Phoca extensions useful, please support the project
-
hockey2112
- Phoca Member

- Posts: 24
- Joined: 28 Jul 2009, 03:41
Re: Back button redirect to article
On line 1371, I changed this:
To this:
And it works perfectly. THANK YOU for your help, Jan!
Code: Select all
$backLink = PhocaGalleryRoute::getCategoriesRoute();
Code: Select all
$backLink = 'index.php?option=com_content&view=article&id=9&Itemid=15';
- Jan
- Phoca Hero

- Posts: 49297
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Back button redirect to article
Great to hear it.
Jan
Jan
If you find Phoca extensions useful, please support the project