Created
February 28, 2012 08:28
-
-
Save monsat/1930928 to your computer and use it in GitHub Desktop.
scriptBottom ViewBlock in Layout
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<?php echo $this->Html->charset(); ?> | |
<title><?php echo $title_for_layout; ?></title> | |
</head> | |
<body> | |
<div id="container"> | |
<div id="header"> | |
<h1><?php echo $this->Html->link($cakeDescription, 'http://cakephp.org'); ?></h1> | |
</div> | |
<div id="content"> | |
<?php echo $this->Session->flash(); ?> | |
<?php echo $this->fetch('content'); ?> | |
</div> | |
<div id="footer"><?php echo $this->Html->link($this->Html->image('cake.power.gif', array('alt' => $cakeDescription, 'border' => '0')), 'http://www.cakephp.org/', array('target' => '_blank', 'escape' => false)); ?></div> | |
</div> | |
<?php echo $this->fetch('scriptBottom'); ?> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<p> | |
ユーザーの一覧を表示します。<br /> | |
編集する場合はユーザー名をクリックしてください。<br /> | |
</p> | |
<?php | |
foreach ($users as $user) { | |
echo $this->Html->link($user['User']['name'], array('action' => 'view', $user['User']['id'])); | |
echo '<br />'; | |
} | |
?> | |
<?php | |
// bodyの終了タグ直前にJSを | |
$this->Html->script('ga.js', array('block' => 'scriptBottom')); | |
$this->append('scriptBottom', '<!-- script -->'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment