Welcome Guest, Not a member yet? Register   Sign In
Thoughts on sending data to library from view
#2

(This post was last modified: 12-17-2020, 12:06 AM by bivanbi.)

Since you can call view from within a view, you can make the decision what other ('sub') views to load there.

Example: Views/users/list.php

PHP Code:
<?php /** @var ViewData $data */ ?><!DOCTYPE html>
<html lang="en">
<?= view($data->theme->getHeaderViewName(), ['data' => $data]) ?>
<?= view
($data->theme->getBodyViewName(), ['data' => $data]) ?>
<?= view
($data->theme->getFooterViewName(), ['data' => $data]) ?>
</html> 
Reply


Messages In This Thread
RE: Thoughts on sending data to library from view - by bivanbi - 12-17-2020, 12:05 AM



Theme © iAndrew 2016 - Forum software by © MyBB