Welcome Guest, Not a member yet? Register   Sign In
Code Igniter + jQuery template
#1

[eluser]KacperK[/eluser]
Hi guys,

I don't know whether this is a very basic question but this is my problem.

In Code Igniter 2 I'm using a nice jQuery template which gets loading in the welcome controller with a certain view. This is working correctly. But now I am confused how the links in the template should work. When I click a certain link (controller) in the navigation menu I cant just render a view because the page will be opened in a new window. So to avoid this I have to reload the template everytime like this:

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

Personaly, I don't think this is the way the templates should be used but until now it was the only way to have the controller views integrate into the template instead of a new window without stylesheet etc. But the problem with this method is, because I reload the template every time the navigation (the menu highlighting) starts at the beginning every time.

I hope someone can help me with this Smile


Greetings,



Kacper
#2

[eluser]InsiteFX[/eluser]
Code:
$this->load_vars($data);
$this->template->load(‘template’, ‘view’);

InsiteFX
#3

[eluser]KacperK[/eluser]
From your post I understand I need to reload the template (instead of just a view) in every controller that gets called by navigation links in my template. Is that correct?
#4

[eluser]InsiteFX[/eluser]
Or use a MY_Controller

InsiteFX




Theme © iAndrew 2016 - Forum software by © MyBB