I am new to totalJs and right now i can't clearly understand how it handles dynamic views. I've done many projects in CakePHP. Cake has a default layout which handles the main layout of the app.
It looks like this.
<!DOCTYPE html>
<html lang="en">
<head>
<title><?php echo $this->fetch('title'); ?></title>
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
<!-- Include external files and scripts here (See HTML helper for more info.) -->
<?php
echo $this->fetch('meta');
echo $this->fetch('css');
echo $this->fetch('script');
?>
</head>
<body>
<!-- If you'd like some sort of menu to
show up on all of your views, include it here -->
<div id="header">
<div id="menu">...</div>
</div>
<!-- Here's where I want my views to be displayed -->
<?php echo $this->fetch('content'); ?>
<!-- Add a footer to each displayed page -->
<div id="footer">...</div>
</body>
</html>
This layout will handle all the contents of the controllers method Add User view. See code below
<div>
Add Users
<input type='text' name='username' />
<input type='submit' value='submit'/>
</div>
The layout is now can be use by any method of any controller. I know that totalJs has a default layout but does it has a feature-like cakephp's layout?
Thanks in advance and sorry for my very bad english.