ページのレイアウト

sampleモジュールのindexアクションのページを考えると、デフォルトの構成では、以下のように2つのファイルを使い、レイアウトに<html>タグや<head>タグを記述し、テンプレートには<body>内を記述する。

レイアウトファイル
apps/frontend/templates/layout.php
テンプレートファイル
apps/frontend/modules/sample/templates/indexSuccess.php

任意のレイアウトを指定する

  • apps/frontend/templates/my_layout.php
  • /apps/frontend/modules/sample/config/view.yml:
     all:
       has_layout: on
     indexSuccess:
       layout:     my_layout

トップ   編集 凍結 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS

Last-modified: 2009-12-23 (水) 23:29:15