How do I add a link to the CSV download created by the Forena module to my module page?
Do I just copy the link in 'inspect element' and put that in my
$output variable that I return on the recommendations page?
Drupal Answers is a question and answer site for Drupal developers and administrators. It only takes a minute to sign up.Sign up to join this community
For any report that you create (using Forena), just add
.csv as an extention to the report (output) URL. That contains the CSV equivalent of that report.
As a sample, consider the sample report located at
/reports/sample.states (in your own site, one of the samples shipped with Forena). Change the URL to
/reports/sample.states.csv (= just add
.csv to it) to get the same report in
Same technique applies for other supported extensions (export formats), such as adding
.xls (MS Excell),
.doc (MS Word).
By the way, all data blocks are accessible directly via their url also, provided you have permission to access that block. Here are a few samples of that, for the sample report located at