固定ページのテンプレート

使用するファイルの保存場所

 ルートディレクトリー
└ templates
 -internals
 ---page
 ----- ├ default.html--------:今回の対象ファイル(基本ファイル)
 ----- └ company.html--------:特定のディレクトリー(.com/company)のテンプレートだが基本的に使用しない

作業手順

テンプレートにて既に作業を最短で完了するように簡略化されているので、以下の変更を行ってください。。イレギュラーがある場合は、固定ページのテンプレートのマニュアル・ガイドページを見て、カスタマイズしてください。

h1内の条件文の削除

以下の記述はレギュレーションサイト用の記述なので削除してください。

<!--{if mb_strpos($page.id, 'coding/guide') === 0}--><span>マニュアル・ガイド</span>
<!--{elseif mb_strpos($page.id, 'coding/order') === 0}--><span>作業手順・課題</span>
<!--{/if}-->

h1内の改行の変更

更に、h1内の改行をなくして、以下のように変更してください。

<h1><!--{if $page_associate.option.h1}-->{$page_associate.option.h1}<!--{elseif $page.title}-->{$page.title}<!--{/if}--></h1>

テンプレートファイルの読み込みの変更

以下の記述を変更してください。

<!--{if mb_strpos($page.id, 'regulation') === 0}-->
{include file=page/regulation.html}
<!--{elseif $plugin_page_parent.id == 'area'}-->
{include file=page/area/region.html}
<!--{elseif $plugin_page_parent.pid == 'area'}-->
{include file=page/area/prefecture.html}
<!--{elseif $page.id == 'area'}-->
{include file=page/area.html}
<!--{elseif mb_strpos($page.id, 'area') === 0}-->
{include file=page/area/city.html}
<!--{elseif $page.restriction == 'password' and !$smarty.session.security.page[$page.id] and $freo.user.authority != 'root' and $freo.user.authority != 'author'}-->
<form action="{$freo.core.http_file}/view/{if $page.code}{$page.code}{else}{$page.id}{/if}" method="post" class="pwd">
    <input type="text" name="page[password]" size="30" value="" placeholder="パスワード"><input type="submit" value="認証する">
</form>
<!--{elseif file_exists("templates/page/$include_file")}-->
<!--{if $page.restriction == 'password' and !$smarty.session.security.page[$page.id] and $freo.user.authority != 'root' and $freo.user.authority != 'author'}-->
<form action="{$freo.core.http_file}/view/{if $page.code}{$page.code}{else}{$page.id}{/if}" method="post" class="pwd">
    <input type="text" name="page[password]" size="30" value="" placeholder="パスワード"><input type="submit" value="認証する">
</form>
<!--{elseif file_exists("templates/page/$include_file")}-->

2カラム

35行目辺りに以下の記述があります。これは、オプションで「2カラム」が設定されていると、utility.html の内容が表示されるようになります。以下の記述は特に変更する必要はありません。

<!--{if $page_associate.option.aside == '2カラム'}-->
{include file='utility.html'}
<!--{/if}-->

オプションの追加

以下のオプションを追加してください。

オプションの追加

2カラムの選択

2カラムにしたいページで、以下のオプションを選択してください。

  1. 「レイアウト設定を表示する」にチェックをいれる
  2. 「2カラム」にチェックをいれる
2カラムの選択