I want to render a view with CSV style to a string, and when I do so:

$result = views_embed_view($viewname, $displayid);
echo $result;

it return a file, even if I do not ECHO the result it also returns me a file. And I want to have a rendered string to be able to work with it.
I was trying different implementations, not only views_embed_view function, but anytime I reach the render stage it returns me a file...

Please help.

Comments

steven jones’s picture

Status: Active » Fixed

Views data export is kinda geared toward building a file, not a string. i'd suggest you have a look at using Views datasource which might work for your use case.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.