Movable Type(MT)のメインページ以外での新着記事一覧の表示(PHPをSSIにて利用)

| | カテゴリ : Movable Type , Movable Type | コメント(19) | トラックバック(0)
このエントリーをはてなブックマークに追加  

Movable Type(MT)でメインページ以外での新着ブログ記事一覧の表示を行いたい場合、いくつか方法があります。ブログ記事自体のページは結構さびしいもので


<MTEntries lastn="10">?</MTEntries>を使えば最新の10件のブログ記事を表示できます。HTMLで作成している場合ならブログ記事を更新ごとに全再構築を行えば常に最新の記事が表示されます。記事が多くなるとツライです。バッチ処理もあるけど。う?ん。他にはIFLAMEを使えば再構築しなくてもいいがスタイルを指定しないといけないし、高さを指定しておかないといけないと、後一歩のところ。


PHP自体でページ作成しているならこの問題はすぐに解決されるな~。。。


それならPHPを呼んでしまえと。SSIは必須ですけど。
別に固定リンクである必要もないし。


AddHandler server-parsed html

SSIをHTMLで読み出す場合、.htaccessに上記を追加し、ルートディレクトリに置きます。


<?php
<MTEntries lastn="10">
print ("<li class=\"widget-list-item\"><a href=\"<$MTEntryPermalink$>\" title=\"<$MTEntryTitle$>\"><$MTEntryTitle$></a></li>\n");
</MTEntries>
?>


これをPHPファイルで保存。再構築。


「テンプレート」から「ウィジェット」で「新規のウィジェット」を作成。


<div class="widget-recent-entries widget-archives widget">
<h3 class="widget-header">最近のブログ記事</h3>
<div class="widget-content">
<ul class="widget-list">
<!--#include virtual="/パスを含めた作ったPHPファイル"-->
</ul>
</div>
</div>


後は「ホームページウィジェット」でメインページ以外の処理(MTElse)を追加し、新規に作成したウィジェットを呼んで全再構築。


インデックステンプレートを再構築するときに「PHPファイル」を再構築されるので常に最新に。ブログ記事を公開したときにインデックステンプレートも再構築されるのでこれででしょう。


最新のコメント一覧や最新アイテム一覧など上記のことを似たようにすればできます

トラックバック(0)

このブログ記事を参照しているブログ一覧: Movable Type(MT)のメインページ以外での新着記事一覧の表示(PHPをSSIにて利用)

このブログ記事に対するトラックバックURL: http://takot.sakura.ne.jp/mt/mt-tb.cgi/1040

コメント(19)

I visited several sites but the audio feature for audio songs present
at this website is actually superb. https://blackdiamond-casino.com/forum/profile.php?id=232909

Research - giod research is significant to buying a really good dress.

Of course, your ads always be geared towards creating the biggest impact possibilities.
May we all have( dignity, honor and praise) for thhe lord. http://Www.suveydiye.gq/index.php?action=profile

Excellent goods from you, man. I have understand
your stuff previous to and you're just too wonderful.
I really like what you have acquired here, really like what you're stating and the way in which you say
it. You make it entertaining and you still take care
of to keep it smart. I can not wait to read much more from you.
This is really a tremendous site. http://Mail.Nexxsoft.de/index.php/fr/component/k2/item/364-raccordement-et-reseau/?a%5B%5D=%3Ca+href%3Dhttp%3A%2F%2Fradicalmediaparis.com%2F__media__%2Fjs%2Fnetsoltrademark.php%3Fd%3Dwww.waifuzhu.com%252Fhome.php%253Fmod%253Dspace%2526uid%253D1641116%2526do%253Dprofile%2526from%253Dspace%3Edownload+vegas+casino+online%3C%2Fa%3E

Hi there, i read your blog occasionally and i own a similar one and i was
just wondering if you get a lot of spam remarks?
If so how do you prevent it, any plugin or anything you
can advise? I get so much lately it's driving me mad so any help is
very much appreciated.

Thank you for the auspicious writeup. It in fact was a amusement account it.
Look advanced to more added agreeable from you!

By the way, how can we communicate? http://Companynewsgroup.com/__media__/js/netsoltrademark.php?d=Medprof.Mednf.uz%2Fuser%2FMaxwell0341%2F

On June 15, 2011, Jane Velez-Mitchell spoke to HLN's A.J.
Hammer about the O.J. Simpson trial, the Casey Anthony trial and the fascination your public has with both.
Jane Velez-Mitchell covered the To.J. Simpson trial as well as the highly publicized
child molestation trial for Michael Fitzgibbons.
A.J. Hammer asked Mitchell if she felt the Casey Anthony trial was bigger compared to those and also asked
her opinion on why the people was so fascinated with Casey Anthony.


However, an excellent deal will are based upon how free airline Indies bowling goes with regards to their business.

People are flocking is which do not have too much experience, understanding that is where they could struggle.
See ball by ball commentary.

At 11:29 pm, ET, Saturday Night Live returns with new programming featuring
guest Jim Carrey and musical guest the Black Keys.
With Jim Carrey's affinity for physical comedy
the show is for you to be a colossal hit. Similarly to programming on NBC,
could quite possibly live22 angpao video in the user to the left.


Ustream reminds me more of YouTube and EarthCam wherever the channels
you can observe. I'm not knocking YouTube's videos, but
espresso like watching live streaming videos, UStream would are the website to visit.

The Pakistani style of play seemed heavily depending the way they had played on the 1999 World Cup,
starting slow, performing a platform thereafter exploding in the finish.

It now seems that they end up being building from this for the 2011 version for the cup as well.
Not a bad strategy.

All require only a few is exceptional software I came across on the web that will grant you
access to each televised Tar Heels on the web. It will be quite easy get it.
Then its just as simple to install and operate it on your desktop whether a personal computer
or Apple. The only thing else needed for viewing great North Carolina action is really a
high-speed Connection to the web through either cable or DSL.
Now you'll get to see if the Tar Heels can turn it over around
a few new entire body.

At this venue, Eden Gardens, six of the 11 day-night games have
been won along with side batting first, the actual team winning
the toss is susceptible to bat incredibly.
ESPN-STAR Cricket TV channel will telecast this match live and would also beam
the match live at its business. Watch live streaming.

First of all I would like to say great blog! I had a quick question in which I'd
like to ask if you don't mind. I was interested to
know how you center yourself and clear your mind before writing.

I've had a difficult time clearing my mind in getting my ideas out.
I truly do take pleasure in writing but it just seems
like the first 10 to 15 minutes are generally wasted
just trying to figure out how to begin. Any ideas or
tips? Kudos!

Hey there! I've been following your website for some time now and finally got
the courage to go ahead and give you a shout out from Humble Texas!
Just wanted to mention keep up the excellent work! http://revelationonlinedb.ru/question/viagra-without-a-doctor-prescription-ldgrdbloobrewuo/

You could definitely see your expertise in the work you write.
The world hopes for even more passionate writers such as you who are not afraid to say
how they believe. All the time follow your heart. http://www.xmovs.com/user/3305435/InesKma184/info

My brother recommended I might like this website.
He was entirely right. This post actually made my day.
You cann't imagine simply how much time I had spent for this info!
Thanks! http://365.auraviibe.com/blog/380689

Your back up plan could work as a safety net in such a circumstances.
If you're like me, tthe search to bee in shape,
manage weight and overall well-being, at times, feerls deal with.
There constantly good times in any relationship. http://www.siceng.com/home.php?mod=space&uid=330445&do=profile&from=space

Hi, I do believe your website might be having browser compatibility issues.
When I look at your web site in Safari, it looks fine however, if opening in Internet Explorer, it's
got some overlapping issues. I just wanted to provide you with a quick heads up!
Other than that, fantastic website!

You require be careful when choosing a service likewise let let you live22
best game football online. So, purchase your Tennessee Titans tickets
and support the team in system. It can fit any screen size.

The band's 19th album "Hold On" featured two One singles.
He also lends his voice to the famous animation series Madagascar in june 2006.
I was hooked for certainly a week, and which was in 2003.

Do they really handle two difficult defenses in consecutive weeks?

We'll also offer up its big players at each position to avoid.
He is not only perfect player, but he is really the most versatile.

Your way of describing everything in this paragraph is actually
fastidious, every one can without difficulty understand it, Thanks a lot.

Stream movies, play online games and even video chat on appropriate.

A 13-year-old girl said, "I can't explain what the about these animals. Latest lineup valiantly and faithfully rendered their old songs.

My brother suggested I might like this blog.
He was totally right. This post truly made my day.
You can not imagine just how much time I had spent for this information! Thanks!

Great blog here! Also your website loads up
very fast! What host are you using? Can I get your affiliate link to
your host? I wish my web site loaded up as quickly as
yours lol

コメントする

Insert Emoddy tag

画像の中に見える文字を入力してください。

プロフィール

Kamitani79
ニックネーム : Kamitani79
映画鑑賞、音楽、写真、ゲーム。地元・横浜をこよなく愛する( `・∀・´)ノヨロシク
自己紹介 :
このエントリーをはてなブックマークに追加

携帯サイト

つながり

  • ブロガー(ブログ)交流空間 エディタコミュニティ
  • あわせて読みたいブログパーツ
  • フィードメーター - Kamitani79-メロンとバナナとブログ
  • SEO
    loading
Creative Commons License
このブログのライセンスは クリエイティブ・コモンズライセンス.
Powered by Movable Type 6.2.4

最近のアクション

人気のエントリー

最近の写真・画像

空の写真

www.flickr.com
This is a Flickr badge showing public photos and videos from Kamitani79. Make your own badge here.

このブログ記事について

このページは、Kamitani79が2009年5月22日 00:22に書いたブログ記事です。

ひとつ前のブログ記事は「NHK教育テレビ「IT ホワイトボックス」にMovable Typeが紹介。」です。

次のブログ記事は「Yahoo!Japanの検索エンジン(YST)、アルゴリズム更新(5/22)」です。

最近のコンテンツはインデックスページで見られます。過去に書かれたものはアーカイブのページで見られます。