BackEnd : not render template and theme

Talk about writing modules and plugins for CMS Made Simple, or about specific core functionality. This board is for PHP programmers that are contributing to CMSMS not for site developers
Post Reply
eureka
New Member
New Member
Posts: 3
Joined: Thu Jun 16, 2011 5:07 pm

BackEnd : not render template and theme

Post by eureka »

Hi,

Like params "show_template" and "disable_theme" in FrontEnd, I'm searching a mean to get the same behaviour in BackEnd.

I have created my own module and want to allowed BackEnd user to download some data in different formats (CSV, PDF, ...).

For that, I use in my module some header() instructions, whose :

Code: Select all

header("Content-Type: application/csv");

The problem here, is that the start of the BackEnd template is embedded in my files. In other word, my CSV file owns :

Code: Select all

- HTML header
- header of BackEnd
- Navigation
- Start of page content
- Then my data at CSV format.

How could I do so that template is not embedded in my file when I process the header() ?

Thanks for ideas.
eureka
New Member
New Member
Posts: 3
Joined: Thu Jun 16, 2011 5:07 pm

Re: BackEnd : not render template and theme

Post by eureka »

If someone has already implemented AJAX behaviour in BackEnd I imagine he has found a way to retrieve data without all the template.
That is an idea.
Jos
Support Guru
Support Guru
Posts: 4019
Joined: Wed Sep 05, 2007 8:03 pm
Location: The Netherlands

Re: BackEnd : not render template and theme

Post by Jos »

eureka
New Member
New Member
Posts: 3
Joined: Thu Jun 16, 2011 5:07 pm

Re: BackEnd : not render template and theme

Post by eureka »

Hi and thanks Jos !

For information, a way is to perform a :

Code: Select all

ob_end_clean();
before generating data.

For example :

Code: Select all

ob_end_clean();
ob_start();
// stuff here
ob_end_flush();
Post Reply

Return to “Developers Discussion”