Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Use of currentDesign.path in HTL for referencing images in AEM 6.4?

Avatar

Avatar
Validate 1
Level 2
iainc65537558
Level 2

Likes

4 likes

Total Posts

35 posts

Correct Reply

3 solutions
Top badges earned
Validate 1
Boost 3
Boost 1
Applaud 5
Affirm 3
View profile

Avatar
Validate 1
Level 2
iainc65537558
Level 2

Likes

4 likes

Total Posts

35 posts

Correct Reply

3 solutions
Top badges earned
Validate 1
Boost 3
Boost 1
Applaud 5
Affirm 3
View profile
iainc65537558
Level 2

09-11-2018

Since the recommendation to move designs from /etc/designs to /apps/settings/wcm/designs I would like to know what the preferred approach to making a request to an image in that design from HTL

eg we have two designs and in both there is a logo.jpg file. We want to be able to swap the design at the page level using the designPath

If we follow the guides in this Designs and the Designer   it generates a link with the /apps/settings/wcm.........../logo.jpg Shouldn't this be coming through some kind of proxy like etc.clientlibs?  If so how best to structure the design tree and how to reference the image from HTL?

Thanks

View Entire Topic

Avatar

Avatar
Affirm 1
Level 1
shubhaga1
Level 1

Likes

0 likes

Total Posts

5 posts

Correct Reply

2 solutions
Top badges earned
Affirm 1
View profile

Avatar
Affirm 1
Level 1
shubhaga1
Level 1

Likes

0 likes

Total Posts

5 posts

Correct Reply

2 solutions
Top badges earned
Affirm 1
View profile
shubhaga1
Level 1

09-11-2018

You have to convert any CSS, JavaScript and static resources in the Design to a Client Library with allowProxy = true. for eg. check

/libs/settings/wcm/designs/dashboards/static

Restructuring guidance

For any Designs that are managed in SCM, and not written to at run-time via Design Dialogs.

  1. Copy the designs from the Previous Location to the New Location (/apps).
  2. Convert any CSS, JavaScript and static resources in the Design to a Client Library with allowProxy = true.
  3. Update references to the Previous Location in the cq:designPath property.
  4. Update any Pages referencing the Previous Location to use the new Client Library category (this requires updating Page implementation code).
  5. Update AEM Dispatcher rules to allow the serving of Client Libraries via the /etc.clientlibs/.. proxy servlet.
For any Designs that NOT managed in SCM, and modified run-time via Design Dialogs.
  • Do not move author-able Designs out of /etc.