Welcome Guest, Not a member yet? Register   Sign In
Pass custom variables to Shield custom layout
#1

(This post was last modified: 04-11-2024, 03:11 AM by Fred9176.)

Hi,

I'm trying to integrate Shield into my custom layout.

I copied the login.php view into app/Views/Shield and setup my layout in app/Config/Auth.php

My custom layout takes some custom variables as, for example, the title of the page.
PHP Code:
$view_data = [];
$view_data['pageTitle'] = 'My page title;
$view_data['
pageSubtitle'] = 'Page subtitle';

return view('
Modules\MyModule\Views\myview', $view_data); 

How can I pass these variables in the login View ?

Thanks for your help,

Fred
Reply
#2

See https://shield.codeigniter.com/customiza...ntrollers/
Reply
#3

For one your missing the ending quote on 'My page title;
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply




Theme © iAndrew 2016 - Forum software by © MyBB