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
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Adobe Summit 2023 [19th to 23rd March, Las Vegas and Virtual] | Complete AEM Session & Lab list

In formsanddocuments, xdp file not able to set relative path to read custom Lib

Avatar

Level 1

I am current building an application to convert xdp to pdf, 

In order to xdp to be rendered correctly, I have a custom lib which contains fragements for xdp config/ref to be used, so ultimately the xdp will become to a webform user then can fill and submit, then pdf getting generated

 

e.g say i have something like this http://localhost:4061/content/dam/formsanddocuments/myapplications/Customs/1.0/MyForm/MyForm.xdp/jcr...

Screenshot 2023-03-06 at 12.26.32.png

 

Then in my crx/de I have the xdp setting as:

Screenshot 2023-03-06 at 12.20.35.png

 

If you look at it's usehref path, it is pointing at  ..\..\..\****** , so it is reading the render fragment from :

 

Screenshot 2023-03-06 at 12.08.53.png

 

which does its job correctly.

 

BUT, if I place the common lib folder into  something like below,  

 /content/dam/formsanddocuments/myapplications/MyForm-Common/7.0

Screenshot 2023-03-06 at 12.12.01.png

 

and changed the ref to "..\********" :

Screenshot 2023-03-06 at 12.20.11.png

 

It stop working (not rendering xdp correctly)

As you can see already,  the same Header.xdp , node type becomes different if I place them into two places 

/content/MyForm-Common/7.0/CommonFragments/Header.xdp

vs

/content/dam/formsanddocuments/myapplications/MyForm-Common/7.0/CommonFragments/Header.xdp

 

When the common lib is sitting under myapplication folder, I tried  ..\  and  ..\..\ in my xdp  set for usehref, but not possible to get xdp render correctly (it seems not reading the  common lib at all as long as the common lib is sitting under /myapplication folder)

The only way I can get lib working is make it sit under /content directly, and in my xdp, usehref='..\..\..\****'. then it will work...

 

So the question is ,  how do I make the  usehref  pointing at a relative path to my custom lib and make the xdp render working when the lib is sitting in folder structure like 

/content/dam/formsanddocuments/myapplications/MyForm-Common/7.0/CommonFragments/Header.xdp  ?

 

Thanks for help

 

 

 

 

0 Replies