Welcome Guest, Not a member yet? Register   Sign In
Your Opinion on my view library
#9

[eluser]Référencement Google[/eluser]
[quote author="jake73" date="1208980281"]I can access to $data with $this->load->vars($data); ?[/quote]

You of course can do that. A good way to go is to use also your library constructor to simplify things and put in it the stuff that is common to your library. You also can use the MY_Controller.php technique that will make your variables available site wide, here is a simple example:

Code:
class MY_Controller extends Controller {

    function MY_Controller()
    {
        parent::Controller();

        // Set default meta tags globally
        $metas = array(
                        'title'     => 'Default site Title',
                        'meta_desc' => 'Default site description',
                        'meta_keyw' => 'Default site keywords'
                        );

        $this->load->vars($metas);

    }


Messages In This Thread
Your Opinion on my view library - by El Forum - 04-23-2008, 07:14 AM
Your Opinion on my view library - by El Forum - 04-23-2008, 07:21 AM
Your Opinion on my view library - by El Forum - 04-23-2008, 07:37 AM
Your Opinion on my view library - by El Forum - 04-23-2008, 07:37 AM
Your Opinion on my view library - by El Forum - 04-23-2008, 07:39 AM
Your Opinion on my view library - by El Forum - 04-23-2008, 08:17 AM
Your Opinion on my view library - by El Forum - 04-23-2008, 08:51 AM
Your Opinion on my view library - by El Forum - 04-23-2008, 11:31 AM
Your Opinion on my view library - by El Forum - 04-23-2008, 11:39 AM



Theme © iAndrew 2016 - Forum software by © MyBB