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

SOLVED

Rewriting Image and links url while page export

Ankita_Aggarwal
Level 2
Level 2

Hi All,

 

I am able to export page into a zip file with required clientlibs and assets.

Clientlibs are reflecting on the page perfectly, but assets are not, they are not referring the correct path , where they are downloaded in the zip file, instead they are pointing to the path, when an asset is placed on a page.

For example: 

Image should refer path "\content\dam\demo\image.png"

but , its referring path is

"/content/demo/en/_jcr_content/par/image.img.jpg/1588834659990.jpg"

 

Please help.

 

Thanks

Ankita

 

 

1 Accepted Solution
Nirmal_Jose
Correct answer by
Community Advisor
Community Advisor

Hope you are using the Page exporter functionality in AEM itself. If not, please use the capability. Documentation available at [1]

Page exporter is a capability built on content sync framework and it allows a config setup for rewrite. You can create a template for export and in it, you can mention like below 

    <page
        jcr:primaryType="nt:unstructured"
        deep="{Boolean}false"
        extension="html"
        includeImages="{Boolean}true"
        type="overridepages">
        <rewrite
        	jcr:primaryType="nt:unstructured"
        	clientlibs="REWRITE_RELATIVE"
        	links="REWRITE_EXTERNAL"
        	images="REWRITE_EXTERNAL"/>
    </page>   
    <clientlib-category-name
        jcr:primaryType="nt:unstructured"
        extension="css"
        path="/etc/designs/clientlibs/path"
        type="CSS"/>

 

[1] - https://helpx.adobe.com/in/experience-manager/6-4/sites/administering/using/page-exporter.html

View solution in original post

4 Replies
Ankur_Khare
Community Advisor
Community Advisor

Hi Ankita,

 

Few things to note-

When you content author any image and you drag and drop any image it will referred from jcrcontent like you are seeing above.

 

Even you can see how it is stored under jcrcontent in aem.

 

Now to get the path as you want you should use a pathfield in your dialog and not dragging dropping any asset so that it refers to the path as you want.

 

Ankita_Aggarwal
Level 2
Level 2

Thanks for your reply. I will surely try this.

One more thing, same thing is happening with my links.

Link should refer to "http://localhost:4502/content/demo/en.html"

but, instead, its referring to

"file:///C:/Users/admin/Downloads/maximHtml/content/demo/fr.html"

 

Thanks in advance.

 

Ankita

 

 

Nirmal_Jose
Correct answer by
Community Advisor
Community Advisor

Hope you are using the Page exporter functionality in AEM itself. If not, please use the capability. Documentation available at [1]

Page exporter is a capability built on content sync framework and it allows a config setup for rewrite. You can create a template for export and in it, you can mention like below 

    <page
        jcr:primaryType="nt:unstructured"
        deep="{Boolean}false"
        extension="html"
        includeImages="{Boolean}true"
        type="overridepages">
        <rewrite
        	jcr:primaryType="nt:unstructured"
        	clientlibs="REWRITE_RELATIVE"
        	links="REWRITE_EXTERNAL"
        	images="REWRITE_EXTERNAL"/>
    </page>   
    <clientlib-category-name
        jcr:primaryType="nt:unstructured"
        extension="css"
        path="/etc/designs/clientlibs/path"
        type="CSS"/>

 

[1] - https://helpx.adobe.com/in/experience-manager/6-4/sites/administering/using/page-exporter.html

View solution in original post