Cakephp: iterate through pages in a custom view -
i have view several megabytes of data , expect grow radically. controller index function implemented in default way, pagination. export view csv without making changes controller ( i'm fine define header rows , rows included in csv not remove pagination brakes html representation ).
the idea simple: render csv view template, change page, render one. how can change current pagination settings in custom view?
ps: did take @ csv plugin. doesn't work pagination out of memory limits, creates tmp file, prefer stream content on fly.
i wouldn't use paginator here, total amount of records while() loop , fetch data in batches avoid memory limitations. , send comes db directly client. use http client comes cakephp , set proper header properties.
see these 2 answers how send stream:
Comments
Post a Comment