Create link to Phocagallery

Phoca Gallery - image gallery extension
Phoca Member
Phoca Member
Posts: 37
Joined: 09 Nov 2019, 14:39

Create link to Phocagallery

Post by massikk » 10 Nov 2019, 05:45

Hi, I have a question.
My gallery have a lot of categories and I can put all in my menu... In menu I insert only link to all categories.
How I can link a specific category in one article of Joomla? I don't want copy and past url because If change link with router of joomla ( Url rewrite ) my link will broken.
I need plugin or other method to create correct link ( index.php?option=com_phocagallery etc etc )

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

Re: Create link to Phocagallery

Post by Jan » 12 Nov 2019, 15:45

Hi, yes, the easiest way is to just copy the constant link (mostly it does not change). But to get such link dynamically created, just see other Phoca Gallery plugins where these links are used, e.g. Phoca Gallery Content Plugin:

Code: Select all

PhocaGalleryRoute::getImageRoute($image->id, $image->catid, $image->alias, $image->catalias);
JRoute::_(PhocaGalleryRoute::getCategoryRoute($category->id, $category->alias));
to copy or recreate them in your content plugin :idea:

If you find Phoca extensions useful, please support the project

Post Reply