Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multi line template output and FuncMap #32

Open
daryl-williams opened this issue Nov 23, 2021 · 0 comments
Open

Multi line template output and FuncMap #32

daryl-williams opened this issue Nov 23, 2021 · 0 comments

Comments

@daryl-williams
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant