Welcome Guest, Not a member yet? Register   Sign In
Load view from Controller issue
#7

Hi Dave,

In fact I had to put as below in the controller while redirecting back to contact us form.

PHP Code:
/*1*/ $this->load->view('templates/header');
/*2*/ $this->load->view('pages/contact-us'$data);
/*3*/ $this->load->view('templates/footer'); 

If I only add line#2 then contact us form does not include header and footer views in the final rendering of the view. So I had to do it that way. I find it annoying. Is there any better way so I will not have to include header and footer templates while loading view from the controller?

With above code I manage to load contact-us view but then in the address bar it does not show contact-us (http://localhost:8080/42patidarsamaj-staging/contact-us) rather it shows controller name (http://localhost:8080/42patidarsamaj-staging/sendemail). 

Please advise.

Thanks.
Reply


Messages In This Thread
RE: Load view from Controller issue - by hiteshpatel1979 - 06-12-2018, 03:12 AM
RE: Load view from Controller issue - by InsiteFX - 06-12-2018, 03:11 AM
RE: Load view from Controller issue - by InsiteFX - 06-12-2018, 03:32 AM
RE: Load view from Controller issue - by InsiteFX - 06-12-2018, 06:42 AM
RE: Load view from Controller issue - by enelson - 06-12-2018, 09:17 AM
RE: Load view from Controller issue - by InsiteFX - 06-13-2018, 10:55 AM
RE: Load view from Controller issue - by InsiteFX - 06-15-2018, 06:36 AM
RE: Load view from Controller issue - by InsiteFX - 06-15-2018, 08:06 AM
RE: Load view from Controller issue - by InsiteFX - 06-15-2018, 09:33 AM
RE: Load view from Controller issue - by InsiteFX - 06-16-2018, 09:23 AM
RE: Load view from Controller issue - by InsiteFX - 06-22-2018, 10:34 AM



Theme © iAndrew 2016 - Forum software by © MyBB