Welcome Guest, Not a member yet? Register   Sign In
nav dont working properly
#2

When usiing layouts I take and use the first view called dataview and it just passes all the

data first.
PHP Code:
$data = [
    'posts'      => $posts->getLivePosts()->paginate(3'group1'),
    'pager'      => $posts->pager,
    'currentPage' => $posts->pager->getCurrentPage('group1'),
    'totalPages'  => $posts->pager->getPageCount('group1'),
    'categories'  => $categories->getTopCategories(),
    'title'      => 'Blog Home',
    'pageHeading' => 'Blog',
    'subHeading'  => 'Home',
    'typography'  => Services::typography(),
];

/**
 * Make all variables global to all views. (Empty PHP File)
 * view_data is and empty file just for the data, works for
 * me.
 */
echo view('Insitefx\Blog\Views\view_data'$data);   // <-- Just the data nothing else!
echo view('Insitefx\Blog\Views\posts\index');        // <--layout view 
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply


Messages In This Thread
nav dont working properly - by derose - 01-30-2024, 05:16 PM
RE: nav dont working properly - by InsiteFX - 01-31-2024, 05:38 AM
RE: nav dont working properly - by wdeda - 02-01-2024, 10:12 AM
RE: nav dont working properly - by InsiteFX - 02-02-2024, 01:05 AM



Theme © iAndrew 2016 - Forum software by © MyBB