• Explore Vox
  • Culture
  • Entertainment
  • Life
  • Music
  • News & Politics
  • Technology
  • Join Vox
  • Take a Tour
  • Already a Member? Sign in

kiasmablog

技術編

  • KIASMA’s Blog
  • Profile
  • Neighbors
  • Photos
  • More 
    • Audio
    • Videos
    • Books
    • Links
    • Collections

[MT3]Movable Typeの移動について。失敗もはらみつつ。

  • Oct 19, 2007
  • Post a comment

[MT3]Movable Typeの移動について。失敗もはらみつつ。

今日はMT3での話です。テストが終わったので、本番環境に移すという話になりました。同一ドメイン、同一サーバという条件です。

テスト環境(*MTの場所は http://aaa.ホゲ.com/mt/mt.cgi):
http://aaa.ホゲ.com/

から、

本番環境:
http://ホゲ.com/

へ移動するというのが本日のタスク。

 

同一サーバ、ドメインだしデータベース(MySQL)も一緒だし、MTをFTPしなおさなくてもよいかと判断したのが、間違いの元でした。

 

メイン・メニュー > (ブログ名) > 公開の設定 で

 

/home/なんたらかんたら/aaa/public_html/
↓
/home/なんたらかんたら/public_html/

 

と、ふんふん設定しまして、吐き出してしまいました。

確かに静的ページは問題ありませんでしたが、cgiのパスはテスト環境のままだっての!

 

たとえば、検索のcgiが、
http://aaa.ホゲ.com/mt/mt-search.cgi

のままだということです。検索結果のアドレスが、テスト環境のままじゃん、とご指摘を受けてしまいました。恥ずかしい。。。

 

教訓:
スピードも大事ですが、作業は丁寧に!

Post a comment Tags: movable type

[MT4]カテゴリーごとにデザイン(テンプレート)を切り替える方法

  • Oct 14, 2007
  • 2 comments

カテゴリーごとにデザインを変える、すなわち、カテゴリーごとにテンプレートを切り替える方法です。
MT4の新機能タグ<MTSetVarBlock>とか<MTIf>を用いるというしばりで考えました。
2007年10月13日土曜日、WebSig 24/7・MT4分科会でのグループワーク・黒野さんチームで検討いたしました。

【作業手順】

  1. デザインの数だけテンプレートを作成し、それぞれモジュール化します。
  2. カテゴリー(としてマッピングした)テンプレートに条件分岐を書きます。

条件分岐の例その1:

カテゴリー「AAA」の場合、モジュール"AAA"を呼び出し、
カテゴリー「BBB」の場合、モジュール"BBB"を呼び出し、
それら以外のカテゴリーはモジュール"CCC"にする場合の条件分岐の書き方

<MTSetVarBlock name="catList"><$MTEntryCategory$></MTSetVarBlock>
<MTIf name="catList" eq="AAA">
  <$MTInclude module="AAA"$>
  <MTElse>
  <MTIf name="catList" eq="BBB">
    <$MTInclude module="BBB"$>
    <MTElse>
    <$MTInclude module="CCC"$>
  </MTIf>
</MTIf>
</MTEntries>


【応用編】

MTIfのモディファイアですが、「eq」だけでなくいろいろ種類があるようです。「like」を使ったバージョンも作成しました。

▼MTIfの説明
http://movabletype.jp/documentation/appendices/tags/if.html

条件分岐の例その2:

カテゴリー名に「事例」が含まれる場合、モジュール"typeA"を呼び出し、
それら以外のカテゴリーはモジュール"typeB"にする場合の条件分岐の書き方

<MTSetVarBlock name="catList"><$MTEntryCategory$></MTSetVarBlock>
<MTIf name="catList" like="事例">
  <$MTInclude module="typeA"$>
  <MTElse>
  <$MTInclude module="typeB"$>
</MTIf>

※ちなみにMT3までの機能ですと、
「ミワラボ | カテゴリーごとにテンプレートを切り替える」
http://miwa.offside.ne.jp/topics/movable_type/post.html
記載の方法で可能です。

2 comments Tags: movable type
KIASMA

About Me

KIASMA
View my profile

LINKS

  • キアズマ

Photos

  • 259634_2354196083

View more of my photos

Neighborhood

  • チームVox
    チームVox Updated: Nov 2, 2009

Explore friends, family, friends & family, or entire neighborhood.

View my neighbors

Tags

  • movable type

View my tags

Recent Comments

  • KIASMA
    KIASMA said:
    別バージョンを考える時間があれば、もっと... read more
    on [MT4]カテゴリーごとにデザイン(テンプレート)を切り替える方法
  • oscar
    oscar said:
    こんにちは、ホント時間があったらもっとや... read more
    on [MT4]カテゴリーごとにデザイン(テンプレート)を切り替える方法

Archives

  • October 2007 (2)
  • 2007 (2)

Subscribe

  • Subscribe to a feed of these posts
  • Powered by Vox
  • Theme designed by Lilia Ahner
  • Use this theme
  • Home
  • Explore
  • Tour Vox
  • Start a Vox Blog
Already a member? Sign in

Back to top

View Vox in your language: English | Español | Français | 日本語

Brought to you by Six Apart, creators of Movable Type, Vox and TypePad.
Six Apart Services: Blogs | Free Blogs | Content Management | Advertising

Vox © 2003-2008 Six Apart, Ltd. All Rights Reserved.
Help | Learn More | Terms of Service | Privacy Policy | Copyright | Advertise | Get a Free Vox Blog

Loading…

Adding this item will make it viewable to everyone who has access to the group.

Adding this post, and any items in it, will make it viewable to everyone who has access to the group.

Create a link to a person
Search all of Vox
Your Neighborhood
People on Vox

(Select up to five users maximum)

Vox Login

You've been logged out, please sign in to Vox with your email and password to complete this action.

Email:
Password:
 
Embed a Widget
Widget Title: This is optional
Widget Code: Insert outside code here to share media, slideshows, etc. Get more info
OK Cancel

We allow most HTML/CSS, <object> and <embed> code

Processing...
Processing
Message
Confirm
Error
Remove this member