CodeIgniter Forums
Calendar class: multiple layouts on a single page? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Calendar class: multiple layouts on a single page? (/showthread.php?tid=33759)



Calendar class: multiple layouts on a single page? - El Forum - 09-07-2010

[eluser]schuytema[/eluser]
I use the calendar class to display little event calendars next to event lists... works fine... I also use the class to display a "master" calendar with links to the event dates... works fine...

But if I try to put both calendars on a page, the calendar class only uses the formatting from the first time I call the class... so all the calendars on the page look the same.

Each time I make a calendar to display, I set up the $prefs to describe the table layout I want... then load the library with the class... is it ignoring the second time I load the library? Is there a way I can reset the layout $prefs so that I can have multiple calendar layouts on a single page?

Thanks for any advice you have!

-Paul


Calendar class: multiple layouts on a single page? - El Forum - 09-07-2010

[eluser]slowgary[/eluser]
There's an initialize() method in the Calendar class, try calling:
Code:
$this->calendar->initialize($your_config_array);



Calendar class: multiple layouts on a single page? - El Forum - 09-08-2010

[eluser]schuytema[/eluser]
Works like a charm... thanks!

-P