I’m exporting using a template similar to the following example. I get a newline even if the field does not exist. Is there a way to suppress the blank lines in the exported text?
There are better ways to write this, but for now the unwanted lines are coming from the end of the if statement lines however if you remove them you will have to add a line feed back when a value is available eg <br>
You could ensure that the newlines in your text come only after your content, and not between the <% if %> .. <% endif %> blocks. Or, as @TW_Tones says, you could use <br> tags (in conjunction with a \whitespace trim pragma.
Thanks guys - it’s not a viewtemplate. It’s a template used in a custom exporter to a text file, which gets downloaded by the browser. It’s all initiated using a button and the tm-download-file message. Sorry I wasn’t clear.
I want to manage rooms and items for loading into a game engine. Although my game parser can handle the spaces, I would really prefer the only newlines to be between records.