Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Packaging random assets

Avatar

Level 4

Hi,

I have a scenario where we need to get all the assets referenced across all pages. This includes all assets including images, css, videos, etc. So have the following questions.

  1. AssetReferenceSearch API gives only the inline images and videos added in the page and not the referred assets within the rich text component. So is there any other way or API to get all the referenced assets.
  2. I also wanted to know the recommended and simple way or rather an automated way of creating CRX packages where we have a lot of paths to be included. This I wanted to avoid typing or copy-pasting the paths manually in the package manager while creating the package.
1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

Regarding 1) From what I see, the AssetReferenceSearch also searches within properties (e.g. in the text property of a richtext component), so it should work.

Jörg

View solution in original post

3 Replies

Avatar

Level 10

"An automated way of creating CRX packages"

If you want to automate building packages - one option you have is to use the PackageManager API. See the PackageManager API here:

"The CQ5 Quickstart and Web Application."

Avatar

Level 4

Thanks smacdonald2008​. This helps for automatic package building. Is there an API for getting all the assets from a page? (my 1st question)

Avatar

Correct answer by
Employee Advisor

Regarding 1) From what I see, the AssetReferenceSearch also searches within properties (e.g. in the text property of a richtext component), so it should work.

Jörg