From ad3d726d1a4f3ed94fc08adc5d1d9f6ce9181db9 Mon Sep 17 00:00:00 2001 From: alextselegidis Date: Fri, 12 Nov 2021 08:22:49 +0100 Subject: [PATCH] Added new layout loading method to the EA_Loader.php file. --- application/core/EA_Loader.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/application/core/EA_Loader.php b/application/core/EA_Loader.php index 3547a47b..0a733038 100644 --- a/application/core/EA_Loader.php +++ b/application/core/EA_Loader.php @@ -43,16 +43,16 @@ class EA_Loader extends CI_Loader { /** * Loads "layout" files. * - * @param string $layout - * @param string $template + * @param string $layout Path to the layout view file. + * @param string $page Path to the page view file. * @param array $vars An associative array of data to be extracted for use in the view * @param bool $return Whether to return the view output or leave it to the Output class * * @return object|string */ - public function layout(string $layout, string $template, array $vars = [], bool $return = FALSE) + public function layout(string $layout, string $page, array $vars = [], bool $return = FALSE) { - $vars['template'] = APPPATH . 'views/' . $template . '.php'; + $vars['page_path'] = APPPATH . 'views/' . $page . '.php'; return $this->view($layout, $vars, $return); }