Details
-
Improvement
-
Status: Closed
-
Low
-
Resolution: Fixed
-
None
-
None
-
None
Description
I want to change href/src attribute based on some domain-specific context.
One example use case is, I want to render a login url in downloads page when not authenticated and render physical download urls if authenticated.
At the moment, the default content rewriter (SimpleContentRewriter) doesn't provide an easy to override those link generations.
So, I'm thinking of the following protected methods as improvement of
SimpleContentRewriter:
- protected String rewritePageLink(String, ...); // for <a href=".." ...>
- protected String rewriteBinaryLink(String, ...); // for <img src="..." ...>
Then, I can simply override the #rewritePageLink() method or #rewriteBinaryLink() method for specific use cases.
Attachments
Issue Links
- relates to
-
HSTTWO-3048 Backport (7.9): Extensibility to override document/binary link generation in SimpleContentRewriter
- Closed