I have the Link Checker Transformer service turned on and the strip html extension option checked in the felix console. It is working as intended except in the following scenario.
I have an unordered list on a page:
<ul><li>Click Here</li></ul>
On clicking "Click Here", an event is triggered that redirects to another URL: /content/mysite/testpage.html using
jQuery(location).attr('href', "/content/mysite/testpage.html");
In this case, the .html is still dangling around in the URL even after testpage has loaded.
PS: removing ".html" at the end of the URL string cannot be a solution in my case because it will fail in the author mode.
Any help in working with this issue is appreciated. Thanks!
Solved! Go to Solution.
Views
Replies
Total Likes
That makes slightly more sense. You're best bet here is to do something like:
<ul><li data-link="/content/foo.html">Click Here</li></ul>
and then configure the transformer to rewrite data-link (or whatever name) attributes of the li element, just like the href attribute of the a element.
But really, you should just do:
<ul><li><a href="https://forums.adobe.com/content/foo.html">Click Here</a></li></ul>
I'm assuming there's some good reason you can't do this.
Views
Replies
Total Likes
JavaScript content is not rewritten by any of the default rewriter pipeline components.
I'm honestly unclear on what you're trying to accomplish. It seems like you're just using JavaScript to do the same thing that clicking the link would do. Perhaps if you explain what you're trying to accomplish, someone could provide suggestions on how to move forward.
Views
Replies
Total Likes
I have edited my question. There is no anchor tag now. It is a list element. I want to have clean URL's without any .html extensions.
Views
Replies
Total Likes
That makes slightly more sense. You're best bet here is to do something like:
<ul><li data-link="/content/foo.html">Click Here</li></ul>
and then configure the transformer to rewrite data-link (or whatever name) attributes of the li element, just like the href attribute of the a element.
But really, you should just do:
<ul><li><a href="https://forums.adobe.com/content/foo.html">Click Here</a></li></ul>
I'm assuming there's some good reason you can't do this.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies