• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Global Var inside Constructor to pass to view

#5
[eluser]pyrokinesis[/eluser]
Thanks for the help guys...

Ended up opting for the simple solution:

Code:
<?
class Sample_Class extends Controller {
    
    private $active_menu_item;

    public function __construct() {
        parent::__construct();
        $this->active_menu_item = 'Menu Item One';
    }
    
    public function function_one() {
        $data['page_title'] = 'Page Title';
        $data['active_menu_item'] = $this->active_menu_item;
        $this->load_main_view($data);
    }
?>

Thanks


Messages In This Thread
Global Var inside Constructor to pass to view - by El Forum - 09-03-2009, 02:15 AM
Global Var inside Constructor to pass to view - by El Forum - 09-03-2009, 02:20 AM
Global Var inside Constructor to pass to view - by El Forum - 09-03-2009, 02:28 AM
Global Var inside Constructor to pass to view - by El Forum - 09-03-2009, 03:04 AM
Global Var inside Constructor to pass to view - by El Forum - 09-03-2009, 03:32 AM
Global Var inside Constructor to pass to view - by El Forum - 09-03-2009, 12:10 PM
Global Var inside Constructor to pass to view - by El Forum - 09-03-2009, 01:32 PM
Global Var inside Constructor to pass to view - by El Forum - 09-03-2009, 01:55 PM
Global Var inside Constructor to pass to view - by El Forum - 09-03-2009, 08:22 PM
Global Var inside Constructor to pass to view - by El Forum - 08-17-2011, 06:30 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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