![]() |
How to pass content to the regions? - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: How to pass content to the regions? (/showthread.php?tid=35491) |
How to pass content to the regions? - El Forum - 10-31-2010 [eluser]sooner[/eluser] When i call $this->template->render();..It loads the master template.. But the php variables ($title,$header,$content,$sidebar and $footer) in master template are not getting replaced.. for example to write the sidebar i called $this->template->write_view('sidebar', 'the location of the sidebar content'); But the $sidebar is not getting replaced..Any suggestions plz.. How to pass content to the regions? - El Forum - 10-31-2010 [eluser]Dennis Rasmussen[/eluser] Ask the people who made the template library you're using ![]() How to pass content to the regions? - El Forum - 10-31-2010 [eluser]Vheissu[/eluser] [quote author="beginer" date="1288561866"]When i call $this->template->render();..It loads the master template.. But the php variables ($title,$header,$content,$sidebar and $footer) in master template are not getting replaced.. for example to write the sidebar i called $this->template->write_view('sidebar', 'the location of the sidebar content'); But the $sidebar is not getting replaced..Any suggestions plz..[/quote] Perhaps if you told us that you are using Phil Sturgeon's template library you would have already received an answer by now. I am presuming you're using Phil's library and if not, then this might not help. It depends if you are using a parser or just straight-up CI views; it looks like you're referencing variables wrongly. I suggest reading the documentation that Phil recently wrote to see how it works: http://philsturgeon.co.uk/demos/codeigniter-template/user_guide/layouts.html |