Search code examples
content-management-systemliferayliferay-7web-contentliferay-dxp

Lferay documents / media (used in web content) should be delete after deleting web content


Is there any configuration like, documents / media (used in web content) should be delete after deleting web content ?


Solution

  • No. Document and media files are independent type of assets. They may be used in zero, one or many web contents and by many other things (both inside and outside Liferay). Moreover other sites/apps may link to them directly. Therefore deleting them when a web content is removed is not a wise thing to do.

    If you are 100% sure you ONLY use given document/media file in ONLY one web content, you can build a plugin that inspects the web content to be deleted and also deletes the media files used in it.