scope of variables not limited to one view

#1
[eluser]tokyotech[/eluser]
Is there a way to limit the scope of variables passed into a view to only be accessible in that view? I have a header view which takes a $title variable. Then below it, i load up another popup view which should have it's own $title variable. This popup view is getting confused and reading $title from the header view.

#2
[eluser]imn.codeartist[/eluser]
the answer is simple "NO". Just use different variables.

#3
[eluser]rogierb[/eluser]
Just load your view with a different array eg:

Code:
$header['title'] = 'sample title';
$popup['title']='My very own little popup'
$this->load->view('template/header',$header);
$this->load->view('template/popup',$popup);


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.