Keeping your file structure neat and tidy is a great practice to follow. If your Content Finder only holds the files that you actually need on your site, you’ll spend less time searching for something you want to use or need to delete. So, here’s the process.
Let’s start with images. This process works the same way for PDF files, too.
Sign in to AEM and navigate into your site.
Open your Sites browser tab and click the Assets link.
Click on the extension-county-offices card.
Click on your county.
Open the appropriate folder to find the images. We’ll use ANR.
Click the Enter Selection button in the top menu (little gray circle with a check mark).
Click the image or PDF file, or for multiple files, simply click on them as well. Let’s delete both an image and a PDF file. They’ll turn blue when selected.
Click the Trash icon.
In the Delete Asset box, the files will be listed. Click Delete.
The files will be deleted OR…
Note: If you get the ‘One or more items(s) are referenced’ error message, stop before you delete! It means your file is used somewhere. Take a moment to double check that the file is not needed on any web page in your site and remove any links to it before moving forward.
A ‘Force Delete’ will delete the image or PDF file, but if the file is still linked on your website may cause either a ‘null’ space where the image was previously located (see below-right) or a broken link on the text the PDF file was linked to.
Best Practice: Make sure that your image has been deleted from your web page and the PDF text link unlinked from all web pages before deleting files from the Content Finder!
To Continue Editing…
Now this next step is critical!! Before you move on to any other task, click the Exit Selection button in the top menu. If you don’t click Exit Selection, you might find yourself ‘stuck’ in delete mode and unable to continue working in AEM! Once you click Exit Selection, you’re back in edit mode.