Welcome Guest, Not a member yet? Register   Sign In
Passing data from controller to menu
#3

(This post was last modified: 08-12-2020, 04:38 AM by InsiteFX.)

What I do for the data is create a dummy view file that is empty called view_data.php

PHP Code:
$data = [
    'pageDescription' => '',
    'pageKewords'     => '',
    'pageAuthor'      => '',
    'pageTitle'       => '',
];

echo 
view('view_data'$data);
echo 
view('layouts/index-1'); 

Then all I have to do is load the view_data first and all views get the data.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply


Messages In This Thread
RE: Passing data from controller to menu - by InsiteFX - 08-12-2020, 04:36 AM



Theme © iAndrew 2016 - Forum software by © MyBB