Welcome Guest, Not a member yet? Register   Sign In
Ideas/Suggestions for indicating ajax call for Modal window via URL
#1

[eluser]jdav3579[/eluser]
Hi,
My application has two views a skeleton and a content view, the content view will be loaded into the skeleton by default. I have links on my application that open up JQuery windows loaded only with the content view.
Code:
function profile($uid, $modal=null){

   #Get content here as $data

  if($modal!=null){
    $this->load->view('content',$data);
  }else{
    $data=$this->load->view('content',$data,true);
    $this->load->view('skeleton',$data);
  }
}

Then in my Javascript I have to append a bit of data to the end of the url to set modal.

This means I have to repeat all of this code for each potential modal window function.
I was wondering if there is a way of using pre-controller and post controller hooks to
check if the variable is set in the pre-controller hook, and in the post controller hook if the variable is set then output only the content, if its not set then put the output into the skeleton - so moving the if/else statement into the post controller.
#2

[eluser]vitoco[/eluser]
not the same question, but maybe the answer will fit

http://ellislab.com/forums/viewreply/755243/

Saludos
#3

[eluser]jdav3579[/eluser]
Thanks for the reply - For some reason I get an error saying I can't perform the action when I click the link! Would you be able to post the topic heading so I can search for it?
Many thanks!
John
#4

[eluser]vitoco[/eluser]
here :
http://ellislab.com/forums/viewthread/156134/
Saludos




Theme © iAndrew 2016 - Forum software by © MyBB