-1

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?

Ryan Payne
  • 5,249
  • 4
  • 28
  • 69

1 Answers1

1

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:

Option 1: replace

${cmsfn.link(exampleNode)?replace(".html", "")}

Option 2: split

${cmsfn.link(exampleNode)?split(".html")[0]}

Option 3: remove_ending

${cmsfn.link(exampleNode)?remove_ending(".html")}
Ryan Payne
  • 5,249
  • 4
  • 28
  • 69