SSIを利用。月曜(index1.html)~日曜(index7.html)までのファイルを準備。
月曜ファイルの内容例:
<p>
<img src="../../vinyl-images/topic/banana-abo07.jpg" alt="beautiful days(image01)" width="250" height="218" style="margin:30px 0 30px 155px;"> </p>
曜日替り画像を貼りたい場所に以下のように記述。
<!--#config timefmt="%w" -->
<!--#set var="w" value="$DATE_LOCAL" -->
<!--#if expr="$w=1" -->
<!--#include file="index1.html" -->
<!--#elif expr="$w=2" -->
<!--#include file="index2.html" -->
<!--#elif expr="$w=3" -->
<!--#include file="index3.html" -->
<!--#elif expr="$w=4" -->
<!--#include file="index4.html" -->
<!--#elif expr="$w=5" -->
<!--#include file="index5.html" -->
<!--#elif expr="$w=6" -->
<!--#include file="index6.html" -->
<!--#else -->
<!--#include file="index7.html" -->
<!--#endif -->
[2010-03]
別ファイルをincludeせず、次のように別ファイルの内容を直に書いても同じ結果が得られます。簡単な内容ならこちらの方が便利。
<!--#config timefmt="%w" -->
<!--#set var="w" value="$DATE_LOCAL" -->
<!--#if expr="$w=1" -->
<p>
<img src="../../vinyl-images/topic/monday.jpg" alt="beautiful days(image01)" width="250" height="218" style="margin:30px 0 30px 155px;"> </p>
<!--#elif expr="$w=2" -->
<p>
<img src="../../vinyl-images/topic/tuesday.jpg" alt="beautiful days(image02)" width="250" height="218" style="margin:30px 0 30px 155px;"> </p>
(以下略)
[2012-01]