PHP Code to include LeftSidebar Widget
<?php
$Get = [
'data' => [
[
'Title' => 'Test Dashboard',
'Link' => 'test/dashboard',
'Icon' => '<i class="far fa-home me-2" style="width:22px; text-align:center;"></i>'
],
[
'Title' => 'Test Invoice',
'Link' => 'test/doc/inv',
'Icon' => '<i class="far fa-file-invoice me-2" style="width:22px; text-align:center;"></i>'
],
[
'Title' => 'Test Settings',
'Link' => 'test/settings',
'Icon' => '<i class="far fa-cog me-2" style="width:22px; text-align:center;"></i>'
],
]
];
\template\widget("LeftSidebar", $Get);
?>
PHP Code to customize LeftSidebar Widget (Optional)
<?php
$Get = [
'id' => 'sh-LeftSidebar', // Optional: Offcanvas ID, default is 'sh-LeftSidebar'
];
?>
HTML Code to open the LeftSidebar Offcanvas
<!-- Button to open the offcanvas sidebar -->
<button class="btn btn-primary" type="button" data-bs-toggle="offcanvas" data-bs-target="#sh-LeftSidebar" aria-controls="sh-LeftSidebar">
Open Offcanvas Left Sidebar
</button>