Page 1 of 1

Create link to Phocagallery

Posted: 10 Nov 2019, 05:45
by massikk
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 )

Re: Create link to Phocagallery

Posted: 12 Nov 2019, 15:45
by Jan
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:

Jan