Welcome Guest, Not a member yet? Register   Sign In
Event Calendar, Calendar Class and 960.gs
#1

[eluser]lrussell810[/eluser]
I'm needing some direction here. I'm trying to use CodeIgniter to make an event calendar of sorts, and am using the 960.gs for the view format. I've activated the calendar class from the library, it loads fine, but it appears in the top, left portion of my view (HTML 5 webpage). I need it to appear within the specific grid area that I've designated for it. Can anyone help please give me some direction on how to put the calendar where I want it to go? I know that this is probably an easy fix, but I'm very new to CodeIgniter. I'm not too familiar with it, and would really appreciate the help. Thanks a lot!
#2

[eluser]Developer13[/eluser]
Are you outputting the calendar from your controller or from your view? If from your controller, don't. Output it from your view. If you're outputting it from your view, it sounds like a styling issue. Take a look @ the source of the page once it's output and see if you can track down the problem.
#3

[eluser]lrussell810[/eluser]
I must be outputting it from my controller. As I've said before, I'm new to this, and I can't seem to figure out how to output from my view. The styling from there can be easy. I know exactly where I need to put it as I've put a self-made php event calendar there prior to using CodeIgniter.
#4

[eluser]Developer13[/eluser]
Ok - you probably have something similar to this in your controller:

Code:
$this->load->library('calendar');

echo $this->calendar->generate();

$this->load->view('whatever');

Instead of that, try this:

Code:
$this->load->library('calendar');

$data['calendar'] = $this->calendar->generate();

$this->load->view('whatever', $data);

Then, in your view, you can simply <?php echo $calendar; ?> to output your calendar positioned wherever you'd like.
#5

[eluser]lrussell810[/eluser]
Yeah, you're right I forgot to put $data in. Thank you so much for the help. I feel slightly more stupid, and very grateful for all of your help. You're awesome!




Theme © iAndrew 2016 - Forum software by © MyBB