multitemplate icon indicating copy to clipboard operation
multitemplate copied to clipboard

Multi line template output and FuncMap

Open daryl-williams opened this issue 2 years ago • 0 comments

Hi Folks,

I have a template that produces multiline output, and I have to get it to to run in Internet Explorer 11 so using backticks or template literals is not an option. I'm thinking that if I can capture the template output string in a custom function I can then massage it into a one line string that should not impact the display in a browser. My template logic is based on the advanced example of gin-contrib/multitemplate, unfortunately I have been unable to find examples of how to setup a FuncMap so I am hoping someone can tell me:

  1. Will using a FuncMap function to modify a multiline output string to a single line string work to have the template output rendered as a single line inside a {{ template page_content . }} construct.
  2. How to implement a FuncMap function into scenario like the advanced example mentioned above?

If I can provide any further information, please let me know.

Regards, D.

daryl-williams avatar Nov 23 '21 17:11 daryl-williams