これは、本の中で、単純なビューテンプレートの例です。
// app/View/Common/view.ctp
<h1><?php echo $this->fetch('title'); ?></h1>
<?php echo $this->fetch('content'); ?>
<div class="actions">
<h3>Related actions</h3>
<ul>
<?php echo $this->fetch('sidebar'); ?>
</ul> </div>
そして、これはそれがどのように拡張されるかです
// app/View/Posts/view.ctp
<?php
$this->extend('/Common/view');
$this->assign('title', $post);
私の質問は次 のとおりです。必要に応じて上書きするために、タイトルのデフォルト値/コンテンツ(たとえば)を設定するにはどうすればよいですか?
ありがとうございました!