variable to layout |
You can set the variable from your controller, and then show the variable through a footer include:
app/Controllers/Cart.php PHP Code: <?php PHP Code: <?= $this->renderSection('content') ?> app/Views/cart/index.php PHP Code: <?= $this->extend('App\Views\templates\layout_user') ?> app/Views/templates/footer.php PHP Code: <p><?= $variable; ?></p> Display: Code: <p>Some cart content here</p> |
Messages In This Thread |
variable to layout - by pippuccio76 - 01-18-2022, 01:17 PM
RE: variable to layout - by BilltheCat - 01-18-2022, 02:29 PM
RE: variable to layout - by pippuccio76 - 01-19-2022, 08:56 AM
RE: variable to layout - by BilltheCat - 01-19-2022, 09:10 AM
RE: variable to layout - by munaja - 07-10-2023, 11:16 PM
RE: variable to layout - by karthik_code - 12-24-2024, 02:20 AM
RE: variable to layout - by InsiteFX - 12-24-2024, 04:46 AM
|