I know how to redirect to a page...but do not know how to redirect to a .PDF. For example I want the title in the MegaMenu but simply redirect to the PDF, not to a page. Is this possible?
Solved! Go to Solution.
Views
Replies
Total Likes
That's because OOTB the redirect functionality checks to see if the location is internal or external (see /libs/foundation/components/page/page.jsp). If it determines it's internal (i.e. doesn't contain :/) then it appends .html
You could overlay the page.jsp in your page component and check to see if ".pdf" exists, and if it does, don't append .html and if it does, just perform the redirect.
Views
Replies
Total Likes
What version of AEM are you using?
Views
Replies
Total Likes
Instead of providing link to a page, provide the path to .pdf file
It should work
Views
Replies
Total Likes
You can absolutely do that by either pointing to the asset in the DAM, or by specifying an absolute URL. The trick from an SEO perspective is that you'll want to open it in a new window so you keep people on your site. We typically use a link helper class where the link path/url is passed into a sightly class and the logic determines whether it's an internal page and needs to be appended with .html, or whether it's external/an asset, and will set the _blank attribute on the anchor.
Views
Replies
Total Likes
Im in CQ5
Views
Replies
Total Likes
When I go the advanced tab under properties, and use the redirect, I see the file as a .pdf. However, when I go to the live version it wants to take me to a.html. ???
Views
Replies
Total Likes
That's because OOTB the redirect functionality checks to see if the location is internal or external (see /libs/foundation/components/page/page.jsp). If it determines it's internal (i.e. doesn't contain :/) then it appends .html
You could overlay the page.jsp in your page component and check to see if ".pdf" exists, and if it does, don't append .html and if it does, just perform the redirect.
Views
Replies
Total Likes
Views
Likes
Replies