Skip to content

Commit

Permalink
Update default layouts to use blocks.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Dec 18, 2011
1 parent 46bb6c8 commit 0b0a69d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
9 changes: 5 additions & 4 deletions lib/Cake/Console/Templates/skel/View/Layouts/default.ctp
Expand Up @@ -29,7 +29,9 @@

echo $this->Html->css('cake.generic');

echo $scripts_for_layout;
echo $this->fetch('meta');
echo $this->fetch('css');
echo $this->fetch('script');
?>
</head>
<body>
Expand All @@ -41,8 +43,7 @@

<?php echo $this->Session->flash(); ?>

<?php echo $content_for_layout; ?>

<?php echo $this->fetch('content'); ?>
</div>
<div id="footer">
<?php echo $this->Html->link(
Expand All @@ -55,4 +56,4 @@
</div>
<?php echo $this->element('sql_dump'); ?>
</body>
</html>
</html>
9 changes: 5 additions & 4 deletions lib/Cake/View/Layouts/default.ctp
Expand Up @@ -31,7 +31,9 @@ $cakeDescription = __d('cake_dev', 'CakePHP: the rapid development php framework

echo $this->Html->css('cake.generic');

echo $scripts_for_layout;
echo $this->fetch('meta');
echo $this->fetch('css');
echo $this->fetch('script');
?>
</head>
<body>
Expand All @@ -43,8 +45,7 @@ $cakeDescription = __d('cake_dev', 'CakePHP: the rapid development php framework

<?php echo $this->Session->flash(); ?>

<?php echo $content_for_layout; ?>

<?php echo $this->fetch('content'); ?>
</div>
<div id="footer">
<?php echo $this->Html->link(
Expand All @@ -57,4 +58,4 @@ $cakeDescription = __d('cake_dev', 'CakePHP: the rapid development php framework
</div>
<?php echo $this->element('sql_dump'); ?>
</body>
</html>
</html>
3 changes: 2 additions & 1 deletion lib/Cake/View/View.php
Expand Up @@ -586,7 +586,8 @@ public function assign($name, $value) {
}

/**
* Fetch the content for a block.
* Fetch the content for a block. If a block is
* empty or undefined '' will be returnned.
*
* @param string $name Name of the block
* @return The block content or '' if the block does not exist.
Expand Down

0 comments on commit 0b0a69d

Please sign in to comment.