Packaging random assets

Avatar

Avatar

Ashwin_Raju

Avatar

Ashwin_Raju

Ashwin_Raju

27-10-2017

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.

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar

Jörg_Hoh

Employee

Total Posts

3.0K

Likes

996

Correct Reply

1.0K

Avatar

Jörg_Hoh

Employee

Total Posts

3.0K

Likes

996

Correct Reply

1.0K
Jörg_Hoh
Employee

29-10-2017

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

Answers (2)

Answers (2)

Avatar

Avatar

Ashwin_Raju

Avatar

Ashwin_Raju

Ashwin_Raju

28-10-2017

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

Avatar

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Reply

2.3K

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Reply

2.3K
smacdonald2008

27-10-2017

"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."