I have an application done on Code-igniter.
I wanted to pass title and URL to another page when I click on a link to the next page.
For e.g.
Page one - properties/home/details/titleofthecontent - in this page i have a link report it .
When i click on report it i will get next page /report_abuse .Here I need to get the page title and the URL from the previous page.
I have the variable to pass but how could I pass it? This is same as passing values from one view to another view.
Inside your controller, have
$data['nestedView']['otherData'] = 'testing';
before your view includes.
When you call
$this->load->view('view_destinations',$data);
the view_destinations file is going to have
$nestedView['otherData'];
Which you can at that point, pass into the nested view file.
From what you explain, I understand that you want to pass some data from a controller to another (since your URL's are different).
To do this, you can:
You can use $this->uri->segment() of Codeigniter like below.
$this->uri->segment(1); // controller
$this->uri->segment(2); // action
$this->uri->segment(3); // 1stsegment
$this->uri->segment(4); // 2ndsegment
You can pass the variables values via url and get on the controller. and so on.