Expand my Community achievements bar.

SOLVED

Unable to rewrite links during page export

Avatar

Level 2

Hi 

 

I am working on a page export functionality in aem 6.3. I am able to export page into a zip file along with the clientlibs and assets.

clienlibs and assets are reflecting proper on the page, except for the page logo and links.

For link to work, it should refer the path such as :-

"http://localhost:4502/content/demo/en.html"

but, its referring path as below :-

"file:///C:/Users/admin/Downloads/maximHtml%20(4)/content/demo/fr.html"

 

Secondly, logo is following the correct path, but logo present in the zip file is of "file" type. How can i change it to png.

 

please help.

 

Thanks

Ankita

 

 

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

For links, you can refer to https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/rewriting-image-and-links-...

For Logo, you may need to ensure the the logo is a png with an anchor wrapper around it so that it can use the same functionality of asset and link rewrite. 

 

View solution in original post

7 Replies

Avatar

Level 10
Can you give us the exported zip for analysis?

Avatar

Level 2
yes. But, how to share the exporter zip here.

Avatar

Level 10
Your zip contains a HTML file for the page I guess, right? Can you just extract and share that?

Avatar

Level 2

please find the extracted file.

 


<!doctype html>
<html lang="en">
<head>

<meta charset="utf-8">
<title>English</title>
<meta name="keywords"/>
<meta name="description"/>
<link rel="icon" href="../../etc/designs/demo/favicon.ico"/>



<link rel="stylesheet" href="../../etc/designs/demo/clientlib-all.css" type="text/css">

 

 

 

 

 

</head>
<body class="page">

<div class="page__main">
<header class="page__header">
<div class="page__logo"><a href="../../content/demo/en.html"><img src="../../etc/designs/demo/_jcr_content/page/logo.img.png" alt="Home" title=""></a>
</div>
<nav class="page__topnav">
<ul class="topnav">
<li class="topnav__item topnav__item--selected">
<a class="topnav__link" href="../../content/demo/en.html">English</a>
</li>

<li class="topnav__item false">
<a class="topnav__link" href="../../content/demo/fr.html">Français</a>
</li>
</ul></nav>
</header>

<div class="page__title"><div class="title">
<h1>English</h1>
</div>
</div>
<div class="page__par">



<div class="title">
<h2>Service Component</h2>
</div>




<div class="helloworld">


<pre>
HelloWorldModel says:
Hello World!
This is instance: e7c910c1-98e5-4540-976c-419b14436600
Resource type is: demo/components/content/helloworld

</pre>
</div>




<div class="title">
<h2>Lorem ipsum</h2>
</div>




<div class="text parbase">
<p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.</p>
</div>


<div class="parsys-column cq-colctrl-lt0">
<div class="parsys_column cq-colctrl-lt0-c0">
<div class="text parbase">
<p>Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.</p>
<p>Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi.</p>
<p>Nam liber tempor **bleep** soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat.</p>
</div>

</div>

<div class="parsys_column cq-colctrl-lt0-c1">
<div class="text parbase">
<p>Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis.</p>
<p>At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, At accusam aliquyam diam diam dolore dolores duo eirmod eos erat, et nonumy sed tempor et et invidunt justo labore Stet clita ea et gubergren, kasd magna no rebum. sanctus sea sed takimata ut vero voluptua. est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat.</p>
</div>

</div>
</div>
<div style='clear:both'></div>



<div class="tabDemo"><div class="cq-placeholder section" data-emptytext="Tab Demo Component"></div>


<link rel="stylesheet" href="../../etc.clientlibs/demo/components/content/tabDemo/clientLibTab.css" type="text/css">
<script type="text/javascript" src="../../etc.clientlibs/demo/components/content/tabDemo/clientLibTab.js"></script>

 

<div>

<div class="tab">

<button class="tablinks" onclick="openCity(event, 'Tab1')">Tab1</button>

<button class="tablinks" onclick="openCity(event, 'Tab2')">Tab2</button>

</div>

<div id="Tab1" class="tabcontent">

<div>



<div class="demoImage"><div class="cq-placeholder section" data-emptytext="Demo Image Component"></div>
<a href="../../content/we-retail/ch/de.html">
<img alt="W3Schools" src="../../content/dam/demo/testImage.jpg" width="100" height="100">
</a>

</div>


</div>
</div>

<div id="Tab2" class="tabcontent">

<div>



<div class="demoImage"><div class="cq-placeholder section" data-emptytext="Demo Image Component"></div>
<a href="../../content/we-retail/ca.html">
<img alt="W3Schools" src="../../content/dam/demo/asset.jpg" width="100" height="100">
</a>

</div>


</div>
</div>

</div>
</div>




<div class="demoImage"><div class="cq-placeholder section" data-emptytext="Demo Image Component"></div>
<a href="../../content/demo/fr.html">
<img alt="W3Schools" src="../../content/dam/demo/testImage.jpg" width="100" height="100">
</a>

</div>


</div>

<footer class="page__footer">
<p class="page__copyright">© 2020 demo Site. All rights reserved.</p>
</footer>
</div>



<script type="text/javascript" src="../../etc.clientlibs/clientlibs/granite/jquery.js"></script>
<script type="text/javascript" src="../../etc.clientlibs/clientlibs/granite/utils.js"></script>
<script type="text/javascript" src="../../etc.clientlibs/clientlibs/granite/jquery/granite.js"></script>
<script type="text/javascript" src="../../etc/clientlibs/foundation/jquery.js"></script>
<script type="text/javascript" src="../../etc/designs/demo/clientlib-all.js"></script>

 

 

 

 

 

</body>
</html>

Avatar

Correct answer by
Employee Advisor

For links, you can refer to https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/rewriting-image-and-links-...

For Logo, you may need to ensure the the logo is a png with an anchor wrapper around it so that it can use the same functionality of asset and link rewrite. 

 

Avatar

Level 2
your solution worked. Thanks, but my zip file instead of getting downloaded at the target location is getting downloaded under /var/contentsync folder. i even tried by deleting the nodes under /var/contentsync folder, but no luck. Please help,. Thanks a lot

Avatar

Level 2
Thanks for your suggestion. it worked.