0

I'm trying to get SolSpace User to output a cvs formatted file, but I can't get it to leave in the line breaks, so it only produces one row with all the data in it.

Can anyone confirm that User strips out the line breaks, and is there a way to get it not to?

thanks!

my code:

'ID,Status,Last name,First name,Email,Last Payment,Join Date
{exp:user:users orderby="total_entries" sort="desc" dynamic_parameters="no" limit="500" }{member_id}{if group_id == 10}Member Admin,{/if}{last_name},{first_name},{email},{payment},{join_date format="%m/%d/%y"}
{/exp:user:users}
0

If this is outputted on a webpage, you need to add <br /> at the end of the line to create a visual linebreak in the browser.

If looking at the output source, however, your code indeed outputs in one line. After some testing, it seems to be because of the {if group_id == 10}Member Admin,{/if} part in your code: remove that conditional, and newlines reappear.

This seems to be an issue with EE's parsing of conditionals, because the same phenomenon was observed with native EE tags. Eg:

{exp:channel:entries}{entry_id}
{/exp:channel:entries}

vs

{exp:channel:entries}{entry_id}{if entry_id == 123}test{/if}
{/exp:channel:entries}
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.