The cmsfn.link
templating function includes an .html
extension in its output.
For example:
${cmsfn.link(exampleNode)}
Outputs:
https://examplesite.com/example-page.html
How do I remove the .html
extension?
The cmsfn.link
templating function includes an .html
extension in its output.
For example:
${cmsfn.link(exampleNode)}
Outputs:
https://examplesite.com/example-page.html
How do I remove the .html
extension?
Unfortunately, this can't be done via Magnolia configuration and Magnolia "won't be able to address this issue in the foreseeable future". But there are three FreeMarker built-in options:
${cmsfn.link(exampleNode)?replace(".html", "")}
${cmsfn.link(exampleNode)?split(".html")[0]}
${cmsfn.link(exampleNode)?remove_ending(".html")}