9月
19
【訓練記録】ランダム写真表示MTPhotoGallery2006:09:19:00:32:51
2006/09/19 ⁄⁄ taicho ⁄⁄ MT覚書
ランダム写真表示MTPhotoGalleryで、写真のリンク先は、mt-searchによって検索された結果を表示させるようになっている。
しかし、MT3.3のシステムテンプレート「検索結果」が適用されないのはなぜ?
原因は次のタグ。
<a href="<$MTCGIPath$><$MTSearchScript$>?search=<MTPhotoGalleryImageLink>">
となっていると、このブログ内のテンプレートを呼びにゆかない。
そこで、このブログ内の検索結果テンプレートを呼びにゆくように、↓のように変えてやると、うまく行く。
<a href="<$MTCGIPath$><$MTSearchScript$>?search=<MTPhotoGalleryImageLink>&IncludeBlogs=1">
●全文は以下の通り。
<div id="pickup"> <MTPhotoGallery path="/imgphoto/2006" sort_order="random" count="1"> <a href="<$MTCGIPath$><$MTSearchScript$>?search=<MTPhotoGalleryImageLink>&IncludeBlogs=1"> <img src="<MTPhotoGalleryImageLink>" width="120" height="150" alt="PHOTO" /> </a> </MTPhotoGallery> </div>