Welcome Guest, Not a member yet? Register   Sign In
where to put vars for use in all controller's functions?
#4

[eluser]alpineedge3[/eluser]
thanks Grahack, that worked mostly. one issue is that I need $data to take all the global variables (in $this->globalArray) and add them to the $data array so I can pass $data to views. I have this:

Code:
class Photo extends Myglobals {
    
    var $data;
    
    function Photo(){
        parent::Controller();
        $this->data = array();
        $this->data = $this->globalArray;
        $this->data['heading'] = 'photo';
    }

but i can't access the globalArray as a data variable in the views.


Messages In This Thread
where to put vars for use in all controller's functions? - by El Forum - 12-29-2007, 02:18 PM



Theme © iAndrew 2016 - Forum software by © MyBB