CodeIgniter Forums
2 templates are interfering - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forum-5.html)
+--- Forum: General Help (https://forum.codeigniter.com/forum-24.html)
+--- Thread: 2 templates are interfering (/thread-77199.html)



2 templates are interfering - richb201 - 07-31-2020

I have used ci_synchronicity for a few years on my web app and it works well. I am now using AmazingTemplate which is part of Koolreport and there seems to be a "collision" between the two templates. This is how I am trying to get them both to appear in the same html page:
public function report_generator_amazing()
{
    $this->output->set_template('amazing');   <<this is for amazing
    $this->output->set_template('default2');    <<this is synchronicity

  $report= new MyDashboard;
  $report->run()->render();
}

 This causes both the banner from synchronicity and the dashboard icons from amazing to not appear correctly.  I use xdebug pretty extensively. I'd like to create an extra template called default2_amazing that plays nicely with Amazing. 

I know nothing about templates.  Is there any document which describes how templates work?


RE: 2 templates are interfering - InsiteFX - 07-31-2020

Did you try the output buffering?

PHP Code:
ob_start();

// Your Code

ob_end_flush(); 



RE: 2 templates are interfering - richb201 - 07-31-2020

same result.


RE: 2 templates are interfering - richb201 - 07-31-2020

Thanks again Insite. I managed to get around the issue by creating a faux black banner. I will just display this on top of the page in the same place where the real menu/banner appears on the rest of the application.