#549 Posted in ‘Showtime Image Gallery’

Latest post by Lefteris Kavadas on Saturday, 18 April 2020 01:55 EEST

Jip JJ Jonker
Hi! I believe at this time it is not possible to create a menu item that will show a list of all galleries in a specific category, with a thumbnail and a galerij description. Correct?

I think adding this feature to this extension would be very nice. So we don't have to use article / article categories to create a gallery listing / overview. This could be done using a menu item or maybe as al content plugin? A menu item would be the most logical for Joomla users?


Hope you will consider adding this in some future release.

Kind regrads,
Jip

Lefteris Kavadas
Hi Jip,

Yes you are right. Other customers have also requested this feature. I will do my best to make it happen for the next update.

Regards

Jip JJ Jonker
Hi Lefteris,

Thanks for considering this. In our current project we have created an article category for the galleries, using the custom field attached to the articles to upload / create a galllery. The article title can be used as the gallery title and the article body text as a description. This makes it pretty easy for site managers to create galleries and we are able to show them using a category blog menu item.

The only thing we had to change was that we only wanted the first image in the gallery to appear in the category list. For this we created an template override and use the value gallery ID of the custom field to create a query that finds the first image in that gallery.

We had to figure out the storage location, but I think the creation date of the gallery is used to create the folder structure in the neia folder. Correct?

This works great for us. But if other would like to do the same they do need to have some experience with template overrides and creating a mySQL query.

Using article to create te gallerie listing also has the advantage that you can do some rights management on the article categories. And us maybe comments on the 'gallery' page.

The only thing to keep in mind is that when a 'gallery article' is deleted the gallery itself will still remain in the CMS. I think there is no option to link this somehow?

Kind regards,
Jip

Lefteris Kavadas
If you want to remove the gallery when an article is deleted you can create a simple content plugin and use the onContentAfterDelete hook for articles. There you could just use a few lines to remove the connected gallery:

$idsToDelete = array(x);
JModelLegacy::addIncludePath(JPATH_SITE . '/administrator/components/com_showtime/models');
$model = JModelLegacy::getInstance('Gallery', 'ShowtimeModel', array('ignore_request' => true));
$model->delete($idsToDelete);


Obviously you will have to get the custom field value first and replace it with the "x" in the above sample.
Note that this part of code will also remove the files associated with that gallery.

Regards

Note: An active subscription is required in order to get support for our paid extensions. For our free extensions, if you don't have an account, register and then submit your support request.  In case you just want to ask a question, you can also use the contact form .

Firecoders
Are you using our extensions? Please post a review at the Joomla extensions directory!
Post a review