Follow the instructions below on how to add the starter files to your CodeIgniter 4 project.
Add the following variables .env
file.
WEBSITE_NAME = 'My Website'
WEBSITE_NAME_SEPARATOR = '—'
WEBSITE_NAME_POSITION = 'L'
Add html_title
to your Config/Autoload.php
to the $helpers
array.
public $helpers = ['html_title'];
Copy the file into your app
and public
folders into the respective directorys.
public function index(): string {
$data = [
'title' => 'Home',
'title_options' => [
'website_name' => 'Website Name',
'seperator' => '||',
'website_name_position' => 'R'
]
];
return view('basic-page-template-1', $data);
}