Search

I'm creating a photo gallery organized by categories. One section for categories and another section for the photos (linking the categories with a SBL).

When a category is deleted, the photos SBL field goes empty, but the entry remains. How can my client delete a category and the related photos at the same time?

Make an extension an subscribe to EntryPreDelete and EntryPostDelete delegate.

In EntryPreDelete you retain the Images that should be deleted.

In EntryPostDelete you delete them (this way you're making sure the Gallery entry has been deleted).

How do i grab the Images? EntryManager? My php knowledge is too poor, but iI'll study some extensions and try it. Thanks!

SymQL is your friend.

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details