<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
    <title>MovableType.net 活用ブログ</title>
    <link rel="alternate" type="text/html" href="https://movabletype.net/blog/" />
    <link rel="self" type="application/atom+xml" href="https://movabletype.net/blog/atom.xml" />
    <id>tag:movabletype.net,:/blog//171</id>
    <updated>2026-03-26T08:36:26Z</updated>
    <subtitle>MovableType.net の新機能の使い方や、ウェブサイトの構築・運用に役立つTIPSを紹介しています。</subtitle>    <generator uri="https://movabletype.net/">MovableType.net</generator>
<entry>
    <title>アカウントのログインで多要素認証を利用する方法</title>
    <link rel="alternate" type="text/html" href="https://movabletype.net/blog/2026/03/totp.html" />
    <id>tag:movabletype.net,2003:post-3188398</id>

    <published>2026-03-10T02:00:00Z</published>
    <updated>2026-03-26T08:36:26Z</updated>

    <summary>MovableType.net の管理画面にログイン（サインイン）する際に、多要...</summary>
    <author>
        <name>hayase</name>
            </author>
            <category term="機能紹介" scheme="http://www.sixapart.com/ns/types#category" />
            <content type="html" xml:lang="ja-JP" xml:base="https://movabletype.net/blog/">
        &lt;p&gt;MovableType.net の管理画面にログイン（サインイン）する際に、多要素認証を利用できるようになりました。本記事では、多要素認証の設定・利用方法について紹介します。&lt;/p&gt;&lt;h2&gt;サポートしている認証アプリ&lt;/h2&gt;&lt;p&gt;多要素認証を利用するにはTOTP（時間ベースのワンタイムパスワード）に対応した認証コードの生成アプリケーション (認証アプリ) が必要です。&lt;/p&gt;&lt;p&gt;次の認証コード生成アプリで動作を確認しています。他にも、TOTP規格に準拠した任意のアプリやデバイスを利用できます。&lt;/p&gt;&lt;ul&gt;
&lt;li&gt;Google Authenticator （ &lt;a href=&quot;https://apps.apple.com/jp/app/google-authenticator/id388497605&quot;&gt;iOS版&lt;/a&gt; / &lt;a href=&quot;https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2&amp;amp;hl=ja&amp;amp;pli=1&quot;&gt;Android版&lt;/a&gt; ）&lt;/li&gt;
&lt;li&gt;Microsoft Authenticator （ &lt;a href=&quot;https://apps.apple.com/jp/app/microsoft-authenticator/id983156458&quot;&gt;iOS版&lt;/a&gt; / &lt;a href=&quot;https://play.google.com/store/apps/details?id=com.azure.authenticator&amp;amp;hl=ja&quot;&gt;Android版&lt;/a&gt; ）&lt;/li&gt;
&lt;li&gt;Twilio Authy （ &lt;a href=&quot;https://apps.apple.com/jp/app/twilio-authy/id494168017&quot;&gt;iOS版&lt;/a&gt; / &lt;a href=&quot;https://play.google.com/store/apps/details?id=com.authy.authy&amp;amp;hl=ja&quot;&gt;Android版&lt;/a&gt; ）&lt;/li&gt;
&lt;li&gt;2FA Authenticator (2FAS) （ &lt;a href=&quot;https://apps.apple.com/jp/app/2fa-authenticator-2fas/id1217793794&quot;&gt;iOS版&lt;/a&gt; / &lt;a href=&quot;https://play.google.com/store/apps/details/2FA_Authenticator_2FAS?id=com.twofasapp&amp;amp;hl=ja&quot;&gt;Android版&lt;/a&gt; ）&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://1password.com/jp&quot;&gt;1Password&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;h2&gt;設定方法&lt;/h2&gt;&lt;ol&gt;
&lt;li&gt;&lt;span&gt;管理画面にログイン後、右上にある人のシルエットのアイコンをクリックし [アカウント] ページへ移動&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;左メニューから [多要素認証] を選択し、認証デバイスの [設定する]&amp;nbsp;をクリック&lt;/li&gt;
&lt;li&gt;管理画面に表示されるQRコードを、認証アプリ等で読み込んで登録&lt;/li&gt;
&lt;li&gt;認証アプリに表示された6桁の認証コードを、管理画面に登録&lt;/li&gt;
&lt;li&gt;登録完了後に表示される、リカバリーコードを任意の場所に保管する&lt;/li&gt;
&lt;/ol&gt;&lt;h3&gt;リカバリーコードの保存&lt;/h3&gt;&lt;p&gt;認証コードの登録が完了すると、認証アプリが利用できないときのためのリカバリーコードを表示します。ダウンロードして、任意の場所に保管してください。&lt;/p&gt;&lt;p class=&quot;mt-be-image&quot;&gt;&lt;img src=&quot;https://movabletype.net/blog/.assets/thumbnail/totp05a-640wri.jpg&quot; alt=&quot;&quot; width=&quot;640&quot; height=&quot;297&quot; class=&quot;asset asset-image&quot; style=&quot;max-width:100%;height:auto;display:block&quot;/&gt;&lt;/p&gt;&lt;h3&gt;設定完了例&lt;/h3&gt;&lt;p&gt;Google Authenticator で設定を行った例です。MovableType.net にログインするための&lt;span&gt;6桁の&lt;/span&gt;認証コードが表示されます。&lt;/p&gt;&lt;figure class=&quot;mt-be-image mt-figure mt-figure-center&quot;&gt;&lt;img src=&quot;https://movabletype.net/blog/.assets/thumbnail/totp04-320wri.jpg&quot; alt=&quot;Google Authenticatorで設定した例&quot; width=&quot;320&quot; height=&quot;693&quot; class=&quot;asset asset-image mt-image-center&quot; style=&quot;max-width:100%;height:auto;display:block;margin-left:auto;margin-right:auto&quot;/&gt;&lt;figcaption&gt;Google Authenticator アプリで設定した例&lt;/figcaption&gt;&lt;/figure&gt;&lt;h2&gt;利用方法&lt;/h2&gt;&lt;p&gt;ログイン画面で、メールアドレスとパスワードを入力し、[サインイン] を押します。&lt;/p&gt;&lt;p class=&quot;mt-be-image&quot;&gt;&lt;img src=&quot;https://movabletype.net/blog/.assets/thumbnail/totp06-320wri.jpg&quot; alt=&quot;&quot; width=&quot;320&quot; height=&quot;262&quot; class=&quot;asset asset-image&quot; style=&quot;max-width:100%;height:auto;display:block&quot;/&gt;&lt;/p&gt;&lt;p&gt;次に認証コードの入力欄が表示されるので、認証アプリに表示された6桁のコードを入力して [サインイン] を押すとログインできます。&lt;/p&gt;&lt;p class=&quot;mt-be-image&quot;&gt;&lt;img src=&quot;https://movabletype.net/blog/.assets/thumbnail/totp07-320wri.jpg&quot; alt=&quot;&quot; width=&quot;320&quot; height=&quot;222&quot; class=&quot;asset asset-image&quot; style=&quot;max-width:100%;height:auto;display:block&quot;/&gt;&lt;/p&gt;
        
    </content>
</entry>
<entry>
    <title>Google / Microsoft 365 のOAuth認証を利用してフォームの自動返信メールのFROMアドレスを設定する方法</title>
    <link rel="alternate" type="text/html" href="https://movabletype.net/blog/2026/02/form-oauth.html" />
    <id>tag:movabletype.net,2003:post-3176318</id>

    <published>2026-02-17T02:00:00Z</published>
    <updated>2026-03-26T08:40:13Z</updated>

    <summary>MovableType.net のフォーム機能もしくは、単体サービス Movab...</summary>
    <author>
        <name>hayase</name>
            </author>
            <category term="フォーム" scheme="http://www.sixapart.com/ns/types#category" />
            <content type="html" xml:lang="ja-JP" xml:base="https://movabletype.net/blog/">
        &lt;p&gt;&lt;a href=&quot;https://movabletype.net/&quot;&gt;MovableType.net&lt;/a&gt; のフォーム機能もしくは、単体サービス &lt;a href=&quot;https://movabletype.net/form/&quot;&gt;MovableType.net フォーム&lt;/a&gt; では、フォーム送信者に送られる自動返信メールのFromのメールアドレスを独自のものに変更することができます。&lt;/p&gt;&lt;p&gt;これまではSMTP設定を行うことで、Fromのメールアドレス変更が可能でした。これに加えて、Microsoft 365 アカウントならびに Google アカウントの OAuth 認証で、Fromを変更できるよう機能強化を行いました。お持ちの Microsoft もしくは、Google アカウントのメールアドレスを、From に指定できるようになります。&lt;/p&gt;&lt;p&gt;設定は、管理画面から該当のフォームの基本設定に移動し、自動返信メール項目内の&lt;strong&gt;メール送信設定&lt;/strong&gt;から行ないます。&lt;/p&gt;&lt;p class=&quot;mt-be-image&quot;&gt;&lt;img src=&quot;https://movabletype.net/blog/.assets/thumbnail/%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%BC%E3%83%B3%E3%82%B7%E3%83%A7%E3%83%83%E3%83%88_2026-02-06_16_14_16%EF%BC%883%EF%BC%89-600wri.jpg&quot; alt=&quot;&quot; width=&quot;600&quot; height=&quot;502&quot; class=&quot;asset asset-image&quot; style=&quot;max-width:100%;height:auto;display:block&quot;/&gt;&lt;/p&gt;&lt;p&gt;Microsoft 365 アカウントもしくは Google アカウントの OAuth 認証を使った設定方法を解説します。&lt;/p&gt;&lt;h3&gt;Microsoft 365 アカウントを設定する方法&lt;/h3&gt;&lt;p&gt;メール送信設定で Microsoft 365アカウント (OAuth) を選択して、設定画面最下部の [保存] ボタンで保存します。&lt;/p&gt;&lt;p class=&quot;mt-be-image&quot;&gt;&lt;img src=&quot;https://movabletype.net/blog/.assets/ms01.jpg&quot; alt=&quot;&quot; width=&quot;998&quot; height=&quot;309&quot; class=&quot;asset asset-image&quot; style=&quot;max-width:100%;height:auto;display:block&quot;/&gt;&lt;/p&gt;&lt;p&gt;次に &lt;strong&gt;Microsoft アカウントの認証を実行する&lt;/strong&gt;というリンクが表示されるのでクリックします。&lt;/p&gt;&lt;p class=&quot;mt-be-image&quot;&gt;&lt;img src=&quot;https://movabletype.net/blog/.assets/ms02.jpg&quot; alt=&quot;&quot; width=&quot;602&quot; height=&quot;296&quot; class=&quot;asset asset-image&quot; style=&quot;max-width:100%;height:auto;display:block&quot;/&gt;&lt;/p&gt;&lt;p&gt;Microsoft アカウントにサインインすると、&lt;strong&gt;要求されているアクセス許可&lt;/strong&gt;の画面が表示されるので承諾ボタンを押します。&lt;/p&gt;&lt;p class=&quot;mt-be-image&quot;&gt;&lt;img src=&quot;https://movabletype.net/blog/.assets/%E3%82%A2%E3%82%AB%E3%82%A6%E3%83%B3%E3%83%88%E3%81%AB%E3%82%B5%E3%82%A4%E3%83%B3%E3%82%A4%E3%83%B3.jpg&quot; alt=&quot;&quot; width=&quot;612&quot; height=&quot;651&quot; class=&quot;asset asset-image&quot; style=&quot;max-width:100%;height:auto;display:block&quot;/&gt;&lt;/p&gt;&lt;p&gt;承諾後に戻ってくる MovableType.net の管理画面で、アカウント連携の&lt;strong&gt;連携済みアカウント&lt;/strong&gt;が表示されていれば連携設定が完了です。そのアカウント情報（名前とメールアドレス）が自動返信メールのFromのメールアドレスになります。&lt;/p&gt;&lt;p class=&quot;mt-be-image&quot;&gt;&lt;img src=&quot;https://movabletype.net/blog/.assets/ms03.jpg&quot; alt=&quot;&quot; width=&quot;985&quot; height=&quot;335&quot; class=&quot;asset asset-image&quot; style=&quot;max-width:100%;height:auto;display:block&quot;/&gt;&lt;/p&gt;&lt;p&gt;アカウント連携に記載されている物と異なるアドレスを指定する場合は、&lt;strong&gt;Fromアドレス&lt;/strong&gt;にメールアドレスを入力する必要があります。ただし、事前に Microsoft 365 のFromアドレスの所有者側で設定を行い、代理人として送信するアクセス許可を連携アカウントに与える必要があります。&lt;br&gt;&lt;br&gt;設定は Exchange 管理センターの設定のメールボックスから行います。詳しくは&amp;nbsp;&lt;a href=&quot;https://learn.microsoft.com/ja-jp/microsoft-365/solutions/allow-members-to-send-as-or-send-on-behalf-of-group?view=o365-worldwide&quot;&gt;Microsoft のドキュメント&lt;/a&gt;をご覧ください。&lt;/p&gt;&lt;p class=&quot;mt-be-image&quot;&gt;&lt;img src=&quot;https://movabletype.net/blog/.assets/thumbnail/CleanShot_2026-02-09_at_11_25_08_2x-600wri.jpg&quot; alt=&quot;&quot; width=&quot;600&quot; height=&quot;444&quot; class=&quot;asset asset-image&quot; style=&quot;max-width:100%;height:auto;display:block&quot;/&gt;&lt;/p&gt;&lt;h3&gt;Google アカウントを設定する方法&lt;/h3&gt;&lt;p&gt;メール送信設定で Google アカウント (OAuth) を選択して、設定画面最下部の [保存] ボタンで保存します。&lt;/p&gt;&lt;p class=&quot;mt-be-image&quot;&gt;&lt;img src=&quot;https://movabletype.net/blog/.assets/thumbnail/google01-600wri.jpg&quot; alt=&quot;&quot; width=&quot;600&quot; height=&quot;163&quot; class=&quot;asset asset-image&quot; style=&quot;max-width:100%;height:auto;display:block&quot;/&gt;&lt;/p&gt;&lt;p&gt;次に &lt;strong&gt;Google アカウントの認証を実行する&lt;/strong&gt;というリンクが表示されるのでクリックします。&lt;/p&gt;&lt;p class=&quot;mt-be-image&quot;&gt;&lt;img src=&quot;https://movabletype.net/blog/.assets/google02.jpg&quot; alt=&quot;&quot; width=&quot;675&quot; height=&quot;300&quot; class=&quot;asset asset-image&quot; style=&quot;max-width:100%;height:auto;display:block&quot;/&gt;&lt;/p&gt;&lt;p&gt;設定したいアカウントでサインインすると&lt;strong&gt;「Google は、あなたに関する情報へのアクセスを MovableType.net フォーム に許可します」&lt;/strong&gt;の画面が表示されるので [次へ] のボタンを押します。&lt;/p&gt;&lt;p class=&quot;mt-be-image&quot;&gt;&lt;img src=&quot;https://movabletype.net/blog/.assets/thumbnail/google03-600wri.jpg&quot; alt=&quot;&quot; width=&quot;600&quot; height=&quot;301&quot; class=&quot;asset asset-image&quot; style=&quot;max-width:100%;height:auto;display:block&quot;/&gt;&lt;/p&gt;&lt;p&gt;続いて&lt;strong&gt;「ユーザー本人に代わってメールを送信」&lt;/strong&gt;の&amp;nbsp;[許可] &lt;span&gt;を押します。&lt;/span&gt;&lt;/p&gt;&lt;p&gt;許可後に戻ってくる MovableType.net の管理画面で、アカウント連携の&lt;strong&gt;連携済みアカウント&lt;/strong&gt;が表示されていれば連携設定が完了です。そのアカウント情報（名前とメールアドレス）が自動返信メールのFromのメールアドレスになります。&lt;/p&gt;&lt;p&gt;アカウントのメールアドレスと異なる送信元を設定する場合には、&lt;strong&gt;Fromアドレス&lt;/strong&gt;にメールアドレスを入力する必要があります。この場合は、事前に Gmail のアカウントに他のメールアドレスを追加しておく必要があります。&lt;/p&gt;&lt;p class=&quot;mt-be-image&quot;&gt;&lt;img src=&quot;https://movabletype.net/blog/.assets/google06.jpg&quot; alt=&quot;&quot; width=&quot;984&quot; height=&quot;295&quot; class=&quot;asset asset-image&quot; style=&quot;max-width:100%;height:auto;display:block&quot;/&gt;&lt;/p&gt;&lt;p&gt;設定は Gmail の設定のアカウントページにあります。詳しくは&amp;nbsp;&lt;a href=&quot;https://support.google.com/mail/answer/22370?hl=ja&quot;&gt;Google のドキュメント&lt;/a&gt;をご覧ください。&lt;/p&gt;&lt;p class=&quot;mt-be-image&quot;&gt;&lt;img src=&quot;https://movabletype.net/blog/.assets/google05.jpg&quot; alt=&quot;&quot; width=&quot;1150&quot; height=&quot;455&quot; class=&quot;asset asset-image&quot; style=&quot;max-width:100%;height:auto;display:block&quot;/&gt;&lt;/p&gt;&lt;p&gt;フォームの自動返信メールのFromを Google / Microsoft 365 で OAuth 認証し独自のメールアドレスに設定する方法でした。ぜひご活用ください！&lt;/p&gt;
        
    </content>
</entry>
<entry>
    <title>MovableType.net は 11 周年を迎えました</title>
    <link rel="alternate" type="text/html" href="https://movabletype.net/blog/2026/02/11th-anniversary.html" />
    <id>tag:movabletype.net,2003:post-3168923</id>

    <published>2026-02-05T02:00:00Z</published>
    <updated>2026-02-06T01:07:29Z</updated>

    <summary>いつも MovableType.net ならびに、ファミリー製品である Mova...</summary>
    <author>
        <name>hayase</name>
            </author>
            <category term="お知らせ" scheme="http://www.sixapart.com/ns/types#category" />
            <content type="html" xml:lang="ja-JP" xml:base="https://movabletype.net/blog/">
        &lt;p&gt;いつも &lt;a href=&quot;http://movabletype.net/&quot;&gt;MovableType.net&lt;/a&gt; ならびに、ファミリー製品である &lt;a href=&quot;http://movabletype.net/form/&quot;&gt;MovableType.net フォーム&lt;/a&gt;、&lt;a href=&quot;http://movabletype.net/sitesearch/&quot;&gt;MovableType.net サイトサーチ&lt;/a&gt;をご利用いただき、誠にありがとうございます！&lt;/p&gt;&lt;p&gt;1年前、2025年2月5日の&lt;a href=&quot;https://movabletype.net/blog/2025/02/10th-anniversary.html&quot;&gt;10周年の時&lt;/a&gt;には、たくさんのお客様やパートナーの皆さまから、応援のメッセージをいただきました。本当にありがとうございました。そのお言葉を胸に、さらなる進化を目指してさまざまな機能強化に取り組み、本日11周年を迎えました。&lt;/p&gt;&lt;p class=&quot;mt-be-image&quot;&gt;&lt;img src=&quot;https://movabletype.net/blog/.assets/thumbnail/ogp_20260205-600wri.png&quot; alt=&quot;&quot; width=&quot;600&quot; height=&quot;315&quot; class=&quot;asset asset-image&quot; style=&quot;max-width:100%;height:auto;display:block&quot;/&gt;&lt;/p&gt;&lt;p&gt;ここで、直近1年間のアップデートと改善を振り返ってみたいと思います。&lt;/p&gt;&lt;h2&gt;直近1年の主な機能強化と改善&lt;/h2&gt;&lt;h3&gt;MovableType.net（CMS）&lt;/h3&gt;&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://movabletype.net/2025/02/404template.html&quot;&gt;404エラーテンプレートでかんたんデザイン編集機能が利用できるようになりました&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://movabletype.net/2025/04/resouce-type.html&quot;&gt;かんたんデザイン編集機能のリストタイプで画像とファイルを指定できるようになりました&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://movabletype.net/2025/04/filename.html&quot;&gt;記事のファイル名を必須にするオプションを追加、そのほかの機能改善を行いました&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://movabletype.net/2025/06/bootstrap5.html&quot;&gt;管理画面で利用しているフレームワーク Bootstrap のバージョンアップを行いました&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://movabletype.net/2025/06/form-calender.html&quot;&gt;フォームのカレンダー項目で、アクセス日からの相対日数による指定が可能になりました&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://movabletype.net/2025/06/site-editor.html&quot;&gt;かんたんデザイン編集機能を改善、シンプルな記述で実装できるようになりました&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://movabletype.net/2025/07/wcag.html&quot;&gt;テンプレート機能改善とアクセシビリティチェック機能の対応バージョンを変更しました&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://movabletype.net/2025/07/form-design.html&quot;&gt;フォーム機能でデザインテーマを選べるようになりました&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://movabletype.net/2025/07/recaptchav3.html&quot;&gt;フォームのスパム対策で reCAPTCHA v3 を選択可能に／郵便番号からの住所自動入力を改善&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://movabletype.net/2025/09/form-time.html&quot;&gt;フォームの項目に時間選択を追加、テキスト項目に最大文字数オプションを設定できるようになりました&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://movabletype.net/2025/09/character-conversion.html&quot;&gt;フォームの1行テキストと複数行テキストに文字の自動変換オプションを追加しました&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://movabletype.net/2025/11/form-numerical.html&quot;&gt;フォームの項目に数値入力を追加、その他いくつかの機能強化を行いました&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;h3&gt;MovableType.net フォーム&lt;/h3&gt;&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://movabletype.net/form/2025/06/bootstrap5.html&quot;&gt;管理画面で利用しているフレームワーク Bootstrap のバージョンアップを行いました&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://movabletype.net/form/2025/06/form-calender.html&quot;&gt;カレンダー項目でアクセス日からの相対日数で指定できるようになりました&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://movabletype.net/form/2025/07/form-design.html&quot;&gt;デザインテーマを選べるようになりました&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://movabletype.net/form/2025/07/recaptchav3.html&quot;&gt;スパム対策で reCAPTCHA v3 を選択可能に／郵便番号からの住所自動入力を改善&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://movabletype.net/form/2025/09/form-time.html&quot;&gt;項目に時間選択を追加、テキスト項目に最大文字数オプションを設定できるようになりました&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://movabletype.net/form/2025/09/character-conversion.html&quot;&gt;1行テキストと複数行テキストに文字の自動変換オプションを追加しました&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://movabletype.net/form/2025/11/form-numerical.html&quot;&gt;項目に数値入力を追加、その他いくつかの機能強化を行いました&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;h3&gt;MovableType.net サイトサーチ&lt;/h3&gt;&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://movabletype.net/sitesearch/2025/02/spell-check.html&quot;&gt;検索ワードのスペル修正提案機能を追加しました&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://movabletype.net/sitesearch/2025/06/bootstrap5.html&quot;&gt;管理画面で利用しているフレームワーク Bootstrap のバージョンアップを行いました&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://movabletype.net/sitesearch/2025/11/replace-words.html&quot;&gt;サーチエンジンが出力する文言を変更する機能を追加&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;この1年は、特に「かんたんデザイン編集」と「フォーム」の機能強化に注力してきました。 これらの中には、皆様からいただいたフィードバックをもとに実現したものも多くあります。「こんな機能が欲しい！」といったご要望がございましたら、ぜひお気軽に&lt;a href=&quot;https://movabletype.net/support/account/support.html&quot;&gt;サポートまで&lt;/a&gt;お寄せください。&lt;/p&gt;&lt;h2&gt;プラン体系の変更と料金改定のお知らせ&lt;/h2&gt;&lt;p&gt;改めてのご案内となりますが、2026年4月1日より、各サービスのプラン体系変更および料金改定を実施いたします。&lt;/p&gt;&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://movabletype.net/2025/09/price-revision.html&quot;&gt;MovableType.net プラン体系の変更・料金改定のお知らせ&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://movabletype.net/form/2025/09/price-revision.html&quot;&gt;MovableType.net フォーム プラン体系の変更・料金改定のお知らせ&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://movabletype.net/sitesearch/2025/09/price-revision.html&quot;&gt;MovableType.net サイトサーチ 料金改定・プラン名変更のお知らせ&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;今回の改定によりお客様にはご負担をおかけしますが、何卒ご理解いただけますようお願い申し上げます。&lt;/p&gt;&lt;p&gt;新しいプラン体系では、ビジネスプラン以上において「必要な機能を必要な分だけ」オプションで購入いただけるようになります。 「プラン全体をアップグレードするほどではないけれど、フォームの数だけ少し増やしたい」といった場合でも、柔軟に対応が可能になります。&lt;/p&gt;&lt;p&gt;12周年に向けて、今後も皆様のサイトの安定運用と成長に貢献できるよう、チーム一同邁進してまいります。 引き続き、MovableType.net ファミリーをよろしくお願いいたします！&lt;/p&gt;&lt;p&gt;&lt;strong&gt;【お知らせ：Zoom 相談室を開催中！】 &lt;/strong&gt;毎週水曜17時より「&lt;a href=&quot;https://movabletype.net/zoom-consultation-room.html&quot;&gt;MovableType.net ファミリー Zoom 相談室&lt;/a&gt;」を開催しています。 「ソフトウェア版から MovableType.net へ効率よく引っ越すには？」といった具体的な手順から、導入前のざっくりとしたご相談まで幅広くお受けしています。ぜひお気軽にご参加ください！&lt;/p&gt;
        
    </content>
</entry>
<entry>
    <title>フォーム項目名などを、他の言語で表示するための設定方法</title>
    <link rel="alternate" type="text/html" href="https://movabletype.net/blog/2025/09/other-languages.html" />
    <id>tag:movabletype.net,2003:post-3061903</id>

    <published>2025-09-12T02:00:00Z</published>
    <updated>2025-10-28T05:15:36Z</updated>

    <summary>MovableType.net のフォーム機能では、フォーム項目名やメッセージを...</summary>
    <author>
        <name>hayase</name>
            </author>
            <category term="運用" scheme="http://www.sixapart.com/ns/types#category" />
            <category term="フォーム" scheme="http://www.sixapart.com/ns/types#category" />
            <content type="html" xml:lang="ja-JP" xml:base="https://movabletype.net/blog/">
        &lt;p&gt;MovableType.net のフォーム機能では、フォーム項目名やメッセージを任意の言語に設定することで多言語に対応したフォームを作成できます。&lt;/p&gt;&lt;p&gt;&lt;span&gt;※ 一部変更できないメッセージがあります。日本語以外の言語でフォームを運用する場合は、フォームの [基本設定] &amp;gt; [使用言語] から英語に設定することをおすすめします。&lt;/span&gt;&lt;/p&gt;&lt;p&gt;この記事では、中国語（繁体字）のフォーム作成方法を解説します。&lt;/p&gt;&lt;figure class=&quot;mt-be-image mt-figure mt-figure-center&quot;&gt;&lt;img src=&quot;https://movabletype.net/blog/.assets/thumbnail/ch0-600wri.jpg&quot; alt=&quot;&quot; width=&quot;600&quot; height=&quot;328&quot; class=&quot;asset asset-image mt-image-center&quot; style=&quot;max-width:100%;height:auto;display:block;margin-left:auto;margin-right:auto&quot;/&gt;&lt;figcaption&gt;中国語（繁体字）のフォーム設定例&lt;/figcaption&gt;&lt;/figure&gt;&lt;h2&gt;フォーム項目名&lt;/h2&gt;&lt;p&gt;フォーム項目名は、&lt;strong&gt;項目名&lt;/strong&gt;の文字列を変更することでカスタマイズできます。同様にプレースホルダー、補足説明文も任意の言語に設定できます。&lt;/p&gt;&lt;figure class=&quot;mt-be-image mt-figure mt-figure-center&quot;&gt;&lt;img src=&quot;https://movabletype.net/blog/.assets/thumbnail/ch1-600wri.jpg&quot; alt=&quot;&quot; width=&quot;600&quot; height=&quot;199&quot; class=&quot;asset asset-image mt-image-center&quot; style=&quot;max-width:100%;height:auto;display:block;margin-left:auto;margin-right:auto&quot;/&gt;&lt;figcaption&gt;フォーム項目名に中国語（繁体字）のテキストを設定&lt;/figcaption&gt;&lt;/figure&gt;&lt;h2&gt;送信・確認ボタン&lt;/h2&gt;&lt;p&gt;フォーム送信時の確認ボタンと送信ボタンの文言は、フォームの基本設定の&lt;strong&gt;確認ボタンの文言&lt;/strong&gt;と&lt;strong&gt;送信ボタンの文言&lt;/strong&gt;項目から変更することができます。&lt;/p&gt;&lt;figure class=&quot;mt-be-image mt-figure mt-figure-center&quot;&gt;&lt;img src=&quot;https://movabletype.net/blog/.assets/thumbnail/ch2-600wri.jpg&quot; alt=&quot;&quot; width=&quot;600&quot; height=&quot;180&quot; class=&quot;asset asset-image mt-image-center&quot; style=&quot;max-width:100%;height:auto;display:block;margin-left:auto;margin-right:auto&quot;/&gt;&lt;figcaption&gt;確認・送信ボタンの文言も任意のテキストに変更可能&lt;/figcaption&gt;&lt;/figure&gt;&lt;h2&gt;必須ラベルや表示されるメッセージの変更&lt;/h2&gt;&lt;figure class=&quot;mt-be-image mt-figure mt-figure-center&quot;&gt;&lt;img src=&quot;https://movabletype.net/blog/.assets/thumbnail/%E4%B8%AD%E5%9B%BD%E8%AA%9E%E5%AF%BE%E5%BF%9C%E3%81%AE%E3%83%95%E3%82%A9%E3%83%BC%E3%83%A0%E3%82%92%E4%BD%9C%E3%82%8B-320wri.jpg&quot; alt=&quot;&quot; width=&quot;320&quot; height=&quot;133&quot; class=&quot;asset asset-image mt-image-center&quot; style=&quot;max-width:100%;height:auto;display:block;margin-left:auto;margin-right:auto&quot;/&gt;&lt;figcaption&gt;[必須] ラベルを、CSSで中国語に変更&lt;/figcaption&gt;&lt;/figure&gt;&lt;p&gt;必須項目に表示されるラベルや戻るボタンの文言は、CSSで書き換えることができます。&lt;br&gt;※CSSによる文言の書き換えは、アクセシビリティの観点から推奨されません。どうしても変更が必要な場合にのみご利用ください。&lt;/p&gt;&lt;p&gt;フォーム用CSSに例えば次のように記述します。contentの部分をそれぞれの言語で指定してください。&lt;/p&gt;&lt;pre&gt;&lt;code class=&quot;html&quot;&gt;.badge-required{
  font-size: 0;
}
.badge-required:before{
  font-size: 14px;
content:&quot;必填&quot;;
}

.button-back{
  font-size: 0;
}
.button-back:before{
  font-size: 14px;
content:&quot;返回&quot;;
}&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;フォーム用CSSについてはマニュアルをご覧ください。&lt;/p&gt;&lt;p class=&quot;link&quot;&gt;&lt;a title=&quot;フォームの見た目を編集する - マニュアル | MovableType.net&quot; href=&quot;https://movabletype.net/support/form/custom-css.html&quot;&gt;フォームの見た目を編集する - マニュアル | MovableType.net&lt;/a&gt;&lt;/p&gt;&lt;h2&gt;エラーメッセージについて&lt;/h2&gt;&lt;p&gt;ブラウザが返す標準的なエラーメッセージは、フォームを閲覧しているブラウザやOSの言語設定によって表示されます（ブラウザやOSの言語設定が英語であれば英語のメッセージが表示されます）。&lt;/p&gt;&lt;p class=&quot;link&quot;&gt;&lt;a title=&quot;使用言語とアラート表示の言語について&quot; href=&quot;https://movabletype.net/support/form/alart-setting-lang-japanese.html&quot;&gt;使用言語とアラート表示の言語について&lt;/a&gt;&lt;/p&gt;&lt;p&gt;MovableType.net の固有の機能のエラーメッセージの場合は、カスタムスクリプトで変更することが可能です。詳しくはマニュアルをご覧ください。&lt;/p&gt;&lt;p class=&quot;link&quot;&gt;&lt;a title=&quot;フォームのカスタムスクリプト（バリデーション処理の仕様）&quot; href=&quot;https://movabletype.net/support/form/customscript02.html&quot;&gt;フォームのカスタムスクリプト（バリデーション処理の仕様）&lt;/a&gt;&lt;/p&gt;&lt;h2&gt;受付完了時のメッセージ&lt;/h2&gt;&lt;p&gt;受付完了時にメッセージを表示する場合は、基本設定の&lt;strong&gt;受付完了時の動作&lt;/strong&gt;の&lt;strong&gt;メッセージ&lt;/strong&gt;で指定できます。&lt;/p&gt;&lt;figure class=&quot;mt-be-image mt-figure mt-figure-center&quot;&gt;&lt;img src=&quot;https://movabletype.net/blog/.assets/thumbnail/ch02-600wri.jpg&quot; alt=&quot;&quot; width=&quot;600&quot; height=&quot;154&quot; class=&quot;asset asset-image mt-image-center&quot; style=&quot;max-width:100%;height:auto;display:block;margin-left:auto;margin-right:auto&quot;/&gt;&lt;figcaption&gt;受付完了時のメッセージを中国語で指定&lt;/figcaption&gt;&lt;/figure&gt;&lt;h2&gt;通知メールと自動返信メール&lt;/h2&gt;&lt;p&gt;フォーム送信後に、指定したフォーム管理者送られる通知メールと、フォーム送信者への控えとなる自動返信メールのテキストもカスタマイズ可能です。&lt;/p&gt;&lt;figure class=&quot;mt-be-image mt-figure mt-figure-center&quot;&gt;&lt;img src=&quot;https://movabletype.net/blog/.assets/thumbnail/ch03-600wri.jpg&quot; alt=&quot;&quot; width=&quot;600&quot; height=&quot;370&quot; class=&quot;asset asset-image mt-image-center&quot; style=&quot;max-width:100%;height:auto;display:block;margin-left:auto;margin-right:auto&quot;/&gt;&lt;figcaption&gt;通知メールの件名や本文を設定&lt;/figcaption&gt;&lt;/figure&gt;&lt;figure class=&quot;mt-be-image mt-figure mt-figure-center&quot;&gt;&lt;img src=&quot;https://movabletype.net/blog/.assets/thumbnail/%EF%BD%83h05-600wri.jpg&quot; alt=&quot;&quot; width=&quot;600&quot; height=&quot;432&quot; class=&quot;asset asset-image mt-image-center&quot; style=&quot;max-width:100%;height:auto;display:block;margin-left:auto;margin-right:auto&quot;/&gt;&lt;figcaption&gt;自動返信メールの件名や本文を設定&lt;/figcaption&gt;&lt;/figure&gt;&lt;p&gt;件名・本文・フッターに任意のテキストを記述できます。&lt;strong&gt;入力内容&lt;/strong&gt;を&lt;strong&gt;表示する&lt;/strong&gt;に設定した場合、本文下に指定した項目名とユーザーが入力した内容がそのまま表示されます。&lt;/p&gt;&lt;p&gt;なお、通知メール内に表示される「送信日時：2025.09.10 17:21:58」の部分はカスタマイズできません。&lt;/p&gt;&lt;p&gt;本記事では中国語（繁体字）を例に説明していますが、基本的な手順はどの言語でも同じです。&lt;/p&gt;&lt;p&gt;これらの方法を活用し、他の言語に対応したフォームを作成してみてください。&lt;/p&gt;
        
    </content>
</entry>
<entry>
    <title>新属性値を使った「かんたんデザイン編集」の実装方法3パターン</title>
    <link rel="alternate" type="text/html" href="https://movabletype.net/blog/2025/06/siteeditor-3pattern.html" />
    <id>tag:movabletype.net,2003:post-3003711</id>

    <published>2025-06-24T02:00:00Z</published>
    <updated>2025-06-24T02:00:00Z</updated>

    <summary>2025年6月19日に「かんたんデザイン編集機能を改善、シンプルな記述で実装でき...</summary>
    <author>
        <name>hayase</name>
            </author>
            <category term="機能紹介" scheme="http://www.sixapart.com/ns/types#category" />
            <content type="html" xml:lang="ja-JP" xml:base="https://movabletype.net/blog/">
        &lt;p&gt;2025年6月19日に「&lt;a href=&quot;https://movabletype.net/2025/06/site-editor.html&quot;&gt;かんたんデザイン編集機能を改善、シンプルな記述で実装できるようになりました&lt;/a&gt;」というニュースを発表しました。「&lt;a href=&quot;https://movabletype.net/support/design/easy-design-detail.html&quot;&gt;かんたんデザイン編集&lt;/a&gt;」機能は、サイトの一部をノーコード編集領域として設定できるものです。&lt;/p&gt;&lt;p&gt;ノーコード編集領域を指定する記述方法として新たに追加したのは、次の3つです。&lt;/p&gt;&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;editor:button:selector&lt;/strong&gt;&lt;span&gt;（テンプレート側にボタンを設置する場所をセレクタで指定できる属性）を追加&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;editor:button:placement&lt;/strong&gt;&lt;span&gt;（テンプレート側にボタンを設置する場所を設定する属性）を追加&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;editor:type で &quot;button&quot;&lt;/strong&gt; を、新たに指定できるようになった&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;従来の記述方法では、かんたんデザイン編集画面のプレビューエリアにある&lt;strong&gt;「編集ボタン（下のスクリーンショット画像左側にある鉛筆ボタン）」&lt;/strong&gt;とサイドバーの&lt;strong&gt;「設定パネル（下のスクリーンショット画像右側の枠内）」&lt;/strong&gt;の&lt;span&gt;2カ所&lt;/span&gt;で編集可能な領域を指定をする場合、テンプレート内の&lt;span&gt;2カ所&lt;/span&gt;にほぼ同じソースコードを記述する必要がありました。&lt;/p&gt;&lt;p&gt;今回追加した新属性値を使うと、テンプレート側は空もしくはボタン表示のみを指定し設定パネル側に詳細を記述する、といった分離した記述ができるようになりました。ノーコード対応領域の設定をより短いコードで実現できるようになり、テンプレートのメンテナンスもしやすくなります。&lt;br&gt;※なお、これまで通り&lt;span&gt;2カ所&lt;/span&gt;に記述する方法も引き続き利用できます。&lt;/p&gt;&lt;figure class=&quot;mt-be-image mt-figure mt-figure-center&quot;&gt;&lt;a href=&quot;https://movabletype.net/.assets/siteeditor05a.jpg&quot; target=&quot;_self&quot;&gt;&lt;img class=&quot;asset asset-image mt-image-center&quot; src=&quot;https://movabletype.net/.assets/thumbnail/siteeditor05a-640wri.jpg&quot; alt=&quot;&quot; width=&quot;640&quot; height=&quot;415&quot;&gt;&lt;/a&gt;
&lt;figcaption&gt;Stylish Corporate テーマのかんたんデザイン編集画面&lt;br&gt;Stylish Corporate テーマにおける「メイン画像」の記述例で設定方法をご紹介します&lt;/figcaption&gt;
&lt;/figure&gt;&lt;p&gt;この活用ブログ記事では、これまでのやり方に加えて、&lt;strong&gt;editor:button:selector&lt;/strong&gt; と &lt;strong&gt;editor:type=&quot;button&quot;&lt;/strong&gt;&amp;nbsp;を使った新たな記述方法について、テーマ「&lt;a href=&quot;https://theme.movabletype.net/stylishcorporate/&quot;&gt;StylishCorporate&lt;/a&gt;」のメイン画像&lt;span&gt;（トップページ上部の背景にある大きな画像）&lt;/span&gt;の編集を例に詳しく解説していきます。&lt;/p&gt;&lt;h3&gt;従来の記述方法：テンプレート・設定パネルの&lt;span&gt;2カ所&lt;/span&gt;で重複した内容を指定&lt;/h3&gt;&lt;p&gt;まず、従来の記述方法を紹介します。&lt;/p&gt;&lt;p&gt;メイン画像をノーコード編集可能にする際、プレビュー画面内の鉛筆ボタンと設定パネルの両方から画像を指定できるようにするには、テンプレート編集画面内のテンプレートと設定パネルの&lt;span&gt;2カ所&lt;/span&gt;にソースコードを記述する必要がありました。&lt;/p&gt;&lt;figure class=&quot;mt-be-image mt-figure mt-figure-center&quot;&gt;&lt;img src=&quot;https://movabletype.net/blog/.assets/thumbnail/template_edit-600wri.png&quot; alt=&quot;&quot; width=&quot;600&quot; height=&quot;510&quot; class=&quot;asset asset-image mt-image-center&quot; style=&quot;max-width:100%;height:auto;display:block;margin-left:auto;margin-right:auto&quot;/&gt;&lt;figcaption&gt;テンプレート編集画面：上部がテンプレート、下部が設定パネル&lt;/figcaption&gt;&lt;/figure&gt;&lt;p&gt;これまではこの両方の項目に、重複する内容のソースコードを記述していました。&lt;/p&gt;&lt;h4&gt;テンプレート内&lt;/h4&gt;&lt;pre&gt;&lt;code class=&quot;html&quot;&gt;&amp;lt;$mt:Var
    name=&quot;asset_id&quot;
    editor:type=&quot;image&quot;
    editor:mode=&quot;editor&quot;
    editor:update:selector=&quot;.jumbotron__indexImg&quot;
    editor:update:attribute=&quot;style:backgroundImage&quot;
    editor:label=&quot;メイン画像&quot;
    editor:button:position=&quot;-270,5&quot;
$&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;h4&gt;設定パネル内&lt;/h4&gt;&lt;pre&gt;&lt;code class=&quot;html&quot;&gt;&amp;lt;$mt:Var
    name=&quot;asset_id&quot;
    editor:type=&quot;image&quot;
    editor:mode=&quot;editor&quot;
    editor:update:selector=&quot;.jumbotron__indexImg&quot;
    editor:update:attribute=&quot;style:backgroundImage&quot;
    editor:label=&quot;メイン画像&quot;
    editor:description=&quot;トップページのメイン画像を設定します。横長の画像がおすすめです。&quot;
    editor:register=&quot;0&quot;
$&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;span&gt;今後、編集ボタンと設定パネルで同じタイプのエディタを利用する場合は、後述する「新しい記述方法1」もしくは「2」の方法を利用する方がより短いコードで実装できます。&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;一方で、編集ボタンと設定パネルで異なるタイプのエディタを利用する場合（片方でテンプレート上で直接編集できる contenteditable を利用する場合）には、引き続き2カ所にそれぞれ記述が必要です。&lt;/span&gt;&lt;/p&gt;&lt;h3&gt;新しい記述方法1：設定パネル側の記述のみで編集ボタンも表示&lt;/h3&gt;&lt;p&gt;新たに追加した&amp;nbsp;&lt;strong&gt;editor:button:selector&lt;/strong&gt;という属性値を使うと、テンプレートはそのまま（コードの追加不要）で設定パネル内の記述のみで、かんたんデザイン編集画面の編集ボタンと設定パネルの&lt;span&gt;2カ所&lt;/span&gt;からノーコード編集できるよう指定できます。&lt;/p&gt;&lt;dl&gt;
&lt;dt&gt;editor:button:selector&lt;/dt&gt;
&lt;dd&gt;テンプレート側にボタンを設置する場所をセレクタで指定することができます。指定がない場合 editor:update:selector で指定されている箇所に設置します。&lt;/dd&gt;
&lt;/dl&gt;&lt;p&gt;&lt;br&gt;この属性値を利用した記述方法を紹介します。&lt;/p&gt;&lt;h4&gt;設定パネル内&lt;/h4&gt;&lt;pre&gt;&lt;code class=&quot;html&quot;&gt;&amp;lt;$mt:Var
    name=&quot;asset_id&quot;
    editor:type=&quot;image&quot;
    editor:mode=&quot;editor&quot;
    editor:update:selector=&quot;.jumbotron__indexImg&quot;
    editor:update:attribute=&quot;style:backgroundImage&quot;
    editor:label=&quot;メイン画像&quot;
    editor:description=&quot;トップページのメイン画像を設定します。横長の画像がおすすめです。&quot; 
   editor:button:selector=&quot;.jumbotron__indexImg&quot;
    editor:button:position=&quot;-270,5&quot;
$&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;h5&gt;設定パネル内の属性値設定のポイント&lt;/h5&gt;&lt;ul&gt;
&lt;li&gt;editor:register=&quot;0&quot; を削除する　※editor:register のデフォルト値である 1 に設定される&lt;/li&gt;
&lt;li&gt;editor:button:selector を追加する（今回は .jumbotron__indexImg という class を指定）&lt;/li&gt;
&lt;li&gt;editor:button:position=&quot;-270,5&quot; を追加する&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;かんたんデザイン編集対応を設定パネル側のコード追加だけで実現できるため、コードのメンテナンス性の観点からも新しい記述方法がオススメです。&lt;/p&gt;&lt;h3&gt;新しい記述方法2：テンプレート側はボタンを呼び出すだけの短いコード＋設定パネル側で詳しく記述&lt;/h3&gt;&lt;p&gt;同様の実装を行なうための、もうひとつの実装方法があります。新たに追加した属性 &lt;strong&gt;editor:type=&quot;button&quot;&lt;/strong&gt; を使う方法です。かんたんデザイン編集画面の任意の場所に編集ボタン（鉛筆マーク）を挿入したいけれど、セレクタだと指定できない場合などに利用できます。&lt;/p&gt;&lt;p&gt;テンプレート内にもコードを追加する必要がありますがボタンを呼び出す部分のみなので、従来の方法と比べてコードが短くなります。&lt;/p&gt;&lt;h4&gt;テンプレート内&lt;/h4&gt;&lt;pre&gt;&lt;code class=&quot;html&quot;&gt;&amp;lt;$mt:Var
    name=&quot;asset_id&quot;
    editor:type=&quot;button&quot;
    editor:label=&quot;メイン画像&quot;
    editor:button:position=&quot;-270,5&quot;
$&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;h5&gt;テンプレート内の属性値設定のポイント&lt;/h5&gt;&lt;ul&gt;
&lt;li&gt;name は設定パネルと同じにする&lt;/li&gt;
&lt;li&gt;editor:type=&quot;button&quot; にする&lt;/li&gt;
&lt;li&gt;その他最低減の指定として、labelとposition（ボタンの位置）だけを記載する&lt;/li&gt;
&lt;/ul&gt;&lt;h4&gt;設定パネル内&lt;/h4&gt;&lt;pre&gt;&lt;code class=&quot;html&quot;&gt;&amp;lt;$mt:Var
    name=&quot;asset_id&quot;
    editor:type=&quot;image&quot;
    editor:mode=&quot;editor&quot;
    editor:update:selector=&quot;.jumbotron__indexImg&quot;
    editor:update:attribute=&quot;style:backgroundImage&quot;
    editor:label=&quot;メイン画像&quot;
    editor:description=&quot;トップページのメイン画像を設定します。横長の画像がおすすめです。&quot;
$&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;h5&gt;設定パネル内の属性値設定のポイント&lt;/h5&gt;&lt;ul&gt;
&lt;li&gt;editor:register=&quot;0&quot; を削除する　※editor:register のデフォルト値である 1 に設定される&lt;/li&gt;
&lt;/ul&gt;&lt;hr/&gt;&lt;p&gt;この他にも、表示場所の調整のための &lt;strong&gt;editor:button:placement&lt;/strong&gt; という属性値も追加しました。詳しくはマニュアルも合わせてご覧ください。&lt;/p&gt;&lt;p class=&quot;link&quot;&gt;&lt;a title=&quot;リンクテキスト&quot; href=&quot;https://movabletype.net/support/design/easy-design-detail.html#button&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;かんたんデザイン編集仕様詳細 - マニュアル | MovableType.net&lt;/a&gt;&lt;/p&gt;
        
    </content>
</entry>
<entry>
    <title>プレビュー環境のページでGA4等のタグを読み込まないようにするための preview 変数活用方法</title>
    <link rel="alternate" type="text/html" href="https://movabletype.net/blog/2025/05/preview-variable.html" />
    <id>tag:movabletype.net,2003:post-2888079</id>

    <published>2025-05-27T02:00:00Z</published>
    <updated>2025-06-26T06:49:13Z</updated>

    <summary>※2025/06/26 追記：preview 変数は、ステージング環境は対象外だ...</summary>
    <author>
        <name>壽 かおり</name>
            </author>
            <category term="MTタグ" scheme="http://www.sixapart.com/ns/types#category" />
            <content type="html" xml:lang="ja-JP" xml:base="https://movabletype.net/blog/">
        &lt;p class=&quot;mt-be-image&quot;&gt;&lt;img src=&quot;https://movabletype.net/blog/.assets/thumbnail/ogp_20250527b-600wri.png&quot; alt=&quot;記事サムネイル画像。記事タイトルと、プレビューページにはタグ埋め込み無し、本番ページにはタグ埋め込み有りを図解&quot; width=&quot;600&quot; height=&quot;315&quot; class=&quot;asset asset-image mt-image-center&quot; style=&quot;max-width:100%;height:auto;display:block;margin-left:auto;margin-right:auto&quot;/&gt;&lt;/p&gt;&lt;p&gt;※2025/06/26 追記：preview 変数は、ステージング環境は対象外だったため、記事を書き換えました。&lt;/p&gt;&lt;p&gt;ウェブサイト内の全てのページに GA4（Google Analytics） のタグを埋め込んでいるけれども、関係者だけが見るプレビューページでは動作させたくないこと、あると思います。&lt;/p&gt;&lt;p&gt;そんな時には&amp;nbsp;&lt;a href=&quot;https://movabletype.net/support/others/preview-template.html&quot;&gt;preview 変数&lt;/a&gt;を使うと、特定のコードをプレビュー環境でのみ出力する／出力しない、といった制御が可能です。この変数は条件分岐タグ（&lt;a href=&quot;https://movabletype.net/tags/2007/08/if.html&quot;&gt;MT:If&lt;/a&gt;、&lt;a href=&quot;https://movabletype.net/tags/2007/08/unless.html&quot;&gt;MT:Unless&lt;/a&gt;）と組み合わせて利用します。&lt;/p&gt;&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;&amp;lt;mt:if name=&quot;preview&quot;&amp;gt;〜&amp;lt;/mt:if&amp;gt;&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;このように記述すると、プレビュー環境でのみタグの内部のコードが実行されます。つまり、プレビュー時だけに特定の要素やメッセージを表示したい場合に使用します。&amp;nbsp;&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;&amp;lt;mt:unless name=&quot;preview&quot;&amp;gt;〜&amp;lt;/mt:unless&amp;gt;&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;こちらは、プレビュー環境以外（＝本番環境）でのみ内部のコードが実行されます。これは例えば、アクセス解析タグなど、プレビュー時には実行せず本番環境だけで動作させたいコードや表示に適しています。&lt;/dd&gt;
&lt;/dl&gt;&lt;h2&gt;実装例：プレビューページでは、GA4 のコードを読み込まない&lt;/h2&gt;&lt;p&gt;&lt;code&gt;&amp;lt;mt:unless name=&quot;preview&quot;&amp;gt;&lt;/code&gt;&amp;nbsp;を使って、GA4 のコードを読み込まないようにするためのコードサンプルを示します。&lt;/p&gt;&lt;pre&gt;&lt;code class=&quot;html&quot;&gt;&amp;lt;mt:unless name=&quot;preview&quot;&amp;gt;
  &amp;lt;mt:include module=&quot;google_analytics&quot;&amp;gt;
&amp;lt;/mt:unless&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;この &lt;code&gt;&amp;lt;mt:unless name=&quot;preview&quot;&amp;gt;&lt;/code&gt; タグ内のコードはプレビューページでは出力されません。つまり、上記のコードでは、モジュールテンプレート &quot;google_analytics&quot; 内に記載されているGA4タグは、プレビューページには埋め込まれません。&lt;/p&gt;&lt;figure class=&quot;mt-be-image mt-figure mt-figure-center&quot;&gt;&lt;img src=&quot;https://movabletype.net/blog/.assets/thumbnail/diff_production_preview-600wri.png&quot; alt=&quot;本番環境とプレビューページのソースコードの比較。プレビューページのソースコード上には、34行目に埋め込みコードがない&quot; width=&quot;600&quot; height=&quot;291&quot; class=&quot;asset asset-image mt-image-center&quot; style=&quot;max-width:100%;height:auto;display:block;margin-left:auto;margin-right:auto&quot;/&gt;&lt;figcaption&gt;本番環境のみ34行目に埋め込みコードがあり、プレビューページの34行目は空行&lt;/figcaption&gt;&lt;/figure&gt;&lt;p&gt;GA4 以外にもA/Bテストやアクセス解析ツール、チャットウィジェットなどプレビューページでは動作不要なタグはまとめて、この中に入れてしまうと便利です。&lt;/p&gt;&lt;h3&gt;GTM 利用者へのヒント&lt;/h3&gt;&lt;p&gt;複数のタグを埋め込む際に、GTM（Google Tag Manager） を利用しているケースも多いかと思います。プレビュー環境で、GTM で埋め込んでいる全てのタグを発火しなくて良い場合には、GTM の埋め込みコードを &lt;code&gt;&amp;lt;mt:unless name=&quot;preview&quot;&amp;gt;&lt;/code&gt;&amp;nbsp;に入れてしまうのが最も簡単です。&lt;/p&gt;&lt;p&gt;埋め込みタグごとにプレビュー系ページで発火させるかどうかを制御したい場合には、GTM のトラッカーを使ってタグごとの発火タイミングを調整ください。設定方法の詳細は、GTM の利用方法を参照ください。&lt;/p&gt;&lt;h2&gt;まとめ&lt;/h2&gt;&lt;p&gt;preview 変数を使うと、プレビュー環境下でのコードの埋め込みを制御することが可能です。これにより、関係者のアクセスやテストのデータが混入するのを防ぎ、より正確な分析を行うことができます。&lt;/p&gt;&lt;p&gt;MTタグを活用することで、さまざまな制御が可能なので、ぜひ使いこなしてみてください。制作者向けの情報は「&lt;a href=&quot;https://developer.movabletype.net/&quot;&gt;MovableType.net 制作者向けポータル&lt;/a&gt;」をご参照ください。&lt;/p&gt;&lt;p class=&quot;link&quot;&gt;&lt;a title=&quot;MovableType.net 制作者向けポータル&quot; href=&quot;https://developer.movabletype.net&quot;&gt;MovableType.net 制作者向けポータル&lt;/a&gt;&lt;/p&gt;&lt;p&gt;テーマ開発を基礎から学べるチュートリアル的なコンテンツ&lt;a href=&quot;https://movabletype.net/blog/2025/05/themeguide-revision.html&quot;&gt;「トフでもできる！？MovableType.net テーマ開発」&lt;/a&gt;を、2025年5月15日にアップデートしました。こちらも合わせてご覧ください！&lt;/p&gt;&lt;p class=&quot;link&quot;&gt;&lt;a href=&quot;https://movabletype.net/blog/2025/05/themeguide-revision.html&quot;&gt;テーマ開発を基礎から学べるウェブサイト・PDF・冊子を全面改訂！「トフでもできる！？MovableType.net テーマ開発」 - MovableType.net 活用ブログ&lt;/a&gt;&lt;/p&gt;
        
    </content>
</entry>
<entry>
    <title>テーマ開発を基礎から学べるウェブサイト・PDF・冊子を全面改訂！「トフでもできる！？MovableType.net テーマ開発」</title>
    <link rel="alternate" type="text/html" href="https://movabletype.net/blog/2025/05/themeguide-revision.html" />
    <id>tag:movabletype.net,2003:post-2981512</id>

    <published>2025-05-15T02:11:00Z</published>
    <updated>2025-05-15T05:06:06Z</updated>

    <summary>はじめまして！デザインチームのさとうです。 今年1月に入社し、現在はウェブサイト...</summary>
    <author>
        <name>さとう</name>
            </author>
            <category term="お知らせ" scheme="http://www.sixapart.com/ns/types#category" />
            <content type="html" xml:lang="ja-JP" xml:base="https://movabletype.net/blog/">
        &lt;p dir=&quot;ltr&quot;&gt;&lt;span&gt;はじめまして！デザインチームのさとうです。&lt;br&gt;今年1月に入社し、現在はウェブサイトの更新やイラストの作成などを担当しています。&lt;br&gt;&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot;&gt;&lt;span&gt;本日5月15日、MovableType.net を使って、ウェブサイトを構築する人に役立つコンテンツ「&lt;a title=&quot;トフでもできる！？MovableType.net テーマ開発&quot; href=&quot;https://developer.movabletype.net/themeguide/&quot;&gt;トフでもできる！？MovableType.net テーマ開発&lt;/a&gt;」の大幅改訂を行ないました👏&lt;br&gt;ウェブ版・PDF版・冊子版がすべて最新版の情報になりました！&lt;br&gt;&lt;/span&gt;&lt;/p&gt;&lt;h2&gt;&lt;strong id=&quot;docs-internal-guid-11e64612-7fff-5060-2a8a-28c300b2e19b&quot;&gt;&lt;span&gt;「トフでもできる！？MovableType.net テーマ開発」とは？&lt;/span&gt;&lt;/strong&gt;&lt;/h2&gt;&lt;p class=&quot;mt-be-image&quot;&gt;&lt;img src=&quot;https://movabletype.net/blog/.assets/thumbnail/tophdeki01-640wri.png&quot; alt=&quot;ウェブ版「トフでもできる！？MovableType.net テーマ開発」メインページのスクリーンショット画像&quot; width=&quot;640&quot; height=&quot;400&quot; class=&quot;asset asset-image mt-image-center&quot; style=&quot;max-width:100%;height:auto;display:block;margin-left:auto;margin-right:auto&quot;/&gt;&lt;/p&gt;&lt;p class=&quot;link&quot;&gt;&lt;strong id=&quot;docs-internal-guid-67d5f19d-7fff-746f-748e-68fc1faa3157&quot;&gt;&lt;span&gt;&lt;a href=&quot;https://developer.movabletype.net/themeguide/&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;トフでもできる！？MovableType.net テーマ開発&lt;/a&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot;&gt;&lt;span&gt;「&lt;/span&gt;&lt;a href=&quot;https://developer.movabletype.net/themeguide/&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;&lt;span&gt;トフでもできる！？MovableType.net テーマ開発&lt;/span&gt;&lt;/a&gt;&lt;span&gt;」（以下、トフでき テーマ開発）とは、MovableType.net のテーマ開発を学べる学習コンテンツです。シックス・アパートのキャラクター「トフ」が、皆さまの案内役としてお供します。&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot;&gt;&lt;span&gt;この「&lt;a title=&quot;トフでもできる！？MovableType.net テーマ開発&quot; href=&quot;https://developer.movabletype.net/themeguide/&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;トフでもできる！？MovableType.net テーマ開発&lt;/a&gt;」は、MovableType.net でウェブサイトを構築したい制作者の最初の一歩に最適なコンテンツです。&lt;br&gt;MovableType.net ではHTMLやCSSに加え、「&lt;strong&gt;MTタグ&lt;/strong&gt;」を使って自由なデザインのウェブサイトを作ることができます。これを読みながら手を動かせば、MovableType.net でのウェブサイト制作の基本が一通り理解できます。&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot;&gt;&lt;span&gt;「トフでき テーマ開発」は「&lt;strong&gt;知識編&lt;/strong&gt;」と「&lt;strong&gt;実践編&lt;/strong&gt;」のふたつの構成でできています。&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot;&gt;&lt;span&gt;まず「知識編」で MovableType.net のテーマ制作の流れや仕組みを学び、次の「実践編」ではサンプルサイトを例に各要素を実装するためのコードを詳しく解説していきます。&lt;/span&gt;&lt;/p&gt;&lt;p&gt;「トフでき テーマ開発」の内容が一通りできるようになったら、あとは制作者向けポータルにあるマニュアルやタグリスト、MTタグ逆引き辞典などを参照していけば、思い通りのウェブサイトが作れるようになります！&lt;/p&gt;&lt;figure class=&quot;mt-be-image mt-figure mt-figure-center&quot;&gt;&lt;img src=&quot;https://movabletype.net/blog/.assets/thumbnail/tophdeki02-640wri.png&quot; alt=&quot;ウェブ版「トフでもできる！？MovableType.net テーマ開発」実践編ページのスクリーンショット画像&quot; width=&quot;640&quot; height=&quot;383&quot; class=&quot;asset asset-image mt-image-center&quot; style=&quot;max-width:100%;height:auto;display:block;margin-left:auto;margin-right:auto&quot;/&gt;&lt;figcaption&gt;トフといっしょにサンプルサイトを作っていきます！&lt;/figcaption&gt;&lt;/figure&gt;&lt;p&gt;それでは、今回の主な改訂内容をご紹介します！&lt;/p&gt;&lt;h2&gt;&lt;strong id=&quot;docs-internal-guid-e00a70e4-7fff-6bfd-1a0b-06daf6b66c33&quot;&gt;&lt;span&gt;説明文を更新し、スクリーンショットを一新しました&lt;/span&gt;&lt;/strong&gt;&lt;/h2&gt;&lt;p dir=&quot;ltr&quot;&gt;&lt;span&gt;これまでもたくさんの方にご活用いただいてきた「トフでき テーマ開発」ですが、親しみやすさとわかりやすさはそのままに、コンテンツ全体を見直しました。&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot;&gt;&lt;span&gt;説明文の追加更新、誤字脱字の修正に加えて、スクリーンショット画像も一新しています。2025年5月時点の MovableType.net の画面になっているので、迷わずスムーズに学習することができます。&lt;/span&gt;&lt;/p&gt;&lt;figure class=&quot;mt-be-image mt-figure mt-figure-center&quot;&gt;&lt;img src=&quot;https://movabletype.net/blog/.assets/thumbnail/tophdeki03-640wri.png&quot; alt=&quot;ウェブ版「トフでもできる！？MovableType.net テーマ開発」の解説ページに挿入されている解説画像&quot; width=&quot;640&quot; height=&quot;484&quot; class=&quot;asset asset-image mt-image-center&quot; style=&quot;max-width:100%;height:auto;display:block;margin-left:auto;margin-right:auto&quot;/&gt;&lt;figcaption&gt;画像のサイズも大きくなって見やすくなりました。&lt;/figcaption&gt;&lt;/figure&gt;&lt;h2&gt;&lt;strong id=&quot;docs-internal-guid-5846118e-7fff-73f2-6735-e975a4ba0d48&quot;&gt;&lt;span&gt;サンプルサイトを更新しました&lt;/span&gt;&lt;/strong&gt;&lt;/h2&gt;&lt;p&gt;「トフでき テーマ開発」では、テーマを作成していくうえでの完成目標となる&lt;strong&gt;サンプルサイト&lt;/strong&gt;を用意しています。このサンプルサイトのコード内容を更新しました。&lt;/p&gt;&lt;figure class=&quot;mt-be-image mt-figure mt-figure-center&quot;&gt;&lt;img src=&quot;https://movabletype.net/blog/.assets/thumbnail/tophdeki04-640wri.png&quot; alt=&quot;ウェブ版「トフでもできる！？MovableType.net テーマ開発」サンプルサイトのメインページ&quot; width=&quot;640&quot; height=&quot;400&quot; class=&quot;asset asset-image mt-image-center&quot; style=&quot;max-width:100%;height:auto;display:block;margin-left:auto;margin-right:auto&quot;/&gt;&lt;figcaption&gt;ヘッダーのロゴ画像も刷新しています。&lt;/figcaption&gt;&lt;/figure&gt;&lt;h2&gt;&lt;strong id=&quot;docs-internal-guid-0e5a77ea-7fff-696f-e6fd-7e5619bb276e&quot;&gt;&lt;span&gt;サンプルコードを見直しました&lt;/span&gt;&lt;/strong&gt;&lt;/h2&gt;&lt;p dir=&quot;ltr&quot;&gt;&lt;span&gt;サンプルサイトの更新に伴い、掲載されているサンプルコードの見直し、および修正を行ないました。&lt;br&gt;以前よりも効率の良い記述になっていますので、以前学習したことのある方もぜひ内容を確認してみてくださいね。&lt;/span&gt;&lt;/p&gt;&lt;h2&gt;本文テキストが読みやすくなりました&lt;/h2&gt;&lt;p&gt;&lt;span style=&quot;color: rgb(192, 44, 44);&quot;&gt;（※こちらはPDF版、冊子版のみの改訂です。）&lt;/span&gt;&lt;/p&gt;&lt;p&gt;今回の改訂に合わせて、PDF版、冊子版の本文テキストに「&lt;strong&gt;UDフォント&lt;/strong&gt;」を採用しました。&lt;br&gt;適度な太さと視認性の高いデザインにより、可読性が向上しました。&lt;/p&gt;&lt;p class=&quot;mt-be-image&quot;&gt;&lt;a href=&quot;https://movabletype.net/blog/.assets/tophdeki05.png&quot; target=&quot;_self&quot;&gt;&lt;img src=&quot;https://movabletype.net/blog/.assets/thumbnail/tophdeki05-800wri.png&quot; alt=&quot;改訂前（左）と改訂後（右）の本文テキスト比較画像&quot; width=&quot;800&quot; height=&quot;275&quot; class=&quot;asset asset-image&quot; style=&quot;max-width:100%;height:auto;display:block&quot;/&gt;&lt;/a&gt;&lt;/p&gt;&lt;h2&gt;&lt;strong id=&quot;docs-internal-guid-ab210616-7fff-7117-6333-87f7e3e29b32&quot;&gt;&lt;span&gt;どこで手に入れられるの？&lt;/span&gt;&lt;/strong&gt;&lt;/h2&gt;&lt;p&gt;「トフでもできる！？MovableType.net テーマ開発」は3種類の形式で公開しています。&lt;/p&gt;&lt;h3&gt;&lt;strong id=&quot;docs-internal-guid-3ed9140d-7fff-c79e-8d69-da34d335749b&quot;&gt;&lt;span&gt;ウェブ版&lt;/span&gt;&lt;/strong&gt;&lt;/h3&gt;&lt;p&gt;下記のリンクからアクセスすることができます。&lt;br&gt;PDF版、冊子版には掲載されていない解説や、サンプルサイトなどを確認することができます。&lt;/p&gt;&lt;p class=&quot;link&quot;&gt;&lt;a title=&quot;ウェブ版「トフでもできる！？MovableType.net テーマ開発」&quot; href=&quot;https://developer.movabletype.net/themeguide/&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;ウェブ版「トフでもできる！？MovableType.net テーマ開発」&lt;/a&gt;&lt;/p&gt;&lt;h3&gt;&lt;strong id=&quot;docs-internal-guid-e568984f-7fff-45d1-35a9-020006cb6150&quot;&gt;&lt;span&gt;PDF版&lt;/span&gt;&lt;/strong&gt;&lt;/h3&gt;&lt;p&gt;下記のリンク、もしくはウェブ版の最下部にあるダウンロードボタンから入手できます。&lt;br&gt;冊子版と同じ内容が掲載されています。&lt;/p&gt;&lt;p class=&quot;link&quot;&gt;&lt;a title=&quot;PDF版「トフでもできる！？MovableType.net テーマ開発」をダウンロード&quot; href=&quot;https://developer.movabletype.net/themeguide/.assets/tophdeki_2025.pdf&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;PDF版「トフでもできる！？MovableType.net テーマ開発」をダウンロード&lt;/a&gt;&lt;/p&gt;&lt;h3&gt;冊子版&lt;/h3&gt;&lt;p&gt;各地で開催されるオフラインセミナーやイベントブースなどで配布しています。&lt;/p&gt;&lt;div class=&quot;mt-be-columns&quot; style=&quot;display: flex&quot;&gt;&lt;div class=&#39;mt-be-column&#39;&gt;&lt;figure class=&quot;mt-be-image mt-figure mt-figure-center&quot;&gt;&lt;img src=&quot;https://movabletype.net/blog/.assets/thumbnail/tophdeki06-640wri.jpg&quot; alt=&quot;シックス・アパートのキャラクター「トフ」が、「トフでき テーマ開発」の冊子と共に写っている写真&quot; width=&quot;640&quot; height=&quot;480&quot; class=&quot;asset asset-image mt-image-center&quot; style=&quot;max-width:100%;height:auto;display:block;margin-left:auto;margin-right:auto&quot;/&gt;&lt;figcaption&gt;トフ「わーい、冊子が新しくなったよ〜！」&lt;/figcaption&gt;&lt;/figure&gt;&lt;/div&gt;&lt;div class=&#39;mt-be-column&#39;&gt;&lt;figure class=&quot;mt-be-image mt-figure mt-figure-center&quot;&gt;&lt;img src=&quot;https://movabletype.net/blog/.assets/thumbnail/tophdeki07-640wri.jpg&quot; alt=&quot;シックス・アパートのキャラクター「トフ」が「トフでき テーマ開発」の冊子を読んでいる写真&quot; width=&quot;640&quot; height=&quot;480&quot; class=&quot;asset asset-image mt-image-center&quot; style=&quot;max-width:100%;height:auto;display:block;margin-left:auto;margin-right:auto&quot;/&gt;&lt;figcaption&gt;トフ「ふむふむ、なるほど」&lt;/figcaption&gt;&lt;/figure&gt;&lt;/div&gt;&lt;/div&gt;&lt;hr/&gt;&lt;p&gt;ここまで、主な改訂内容についてご紹介してきました。&lt;/p&gt;&lt;p&gt;よりわかりやすくなった「&lt;a title=&quot;トフでもできる！？MovableType.net テーマ開発&quot; href=&quot;https://developer.movabletype.net/themeguide/&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;トフでもできる！？MovableType.net テーマ開発&lt;/a&gt;」を活用して、ぜひテーマ開発をはじめてみてくださいね！&lt;/p&gt;&lt;figure class=&quot;mt-be-image mt-figure mt-figure-center&quot;&gt;&lt;img src=&quot;https://movabletype.net/blog/.assets/thumbnail/tophdeki08-320wri.png&quot; alt=&quot;シックス・アパートのキャラクター「トフ」が、冊子版「トフでき 開発テーマ」を読みながら勉強しているイラスト&quot; width=&quot;320&quot; height=&quot;269&quot; class=&quot;asset asset-image mt-image-center&quot; style=&quot;max-width:100%;height:auto;display:block;margin-left:auto;margin-right:auto;border:0px;&quot;&gt;&lt;figcaption&gt;トフといっしょにテーマ開発について学びましょう♪&lt;/figcaption&gt;&lt;/figure&gt;
        
    </content>
</entry>
<entry>
    <title>チェックボックスで選択できる上限数を指定する【MovableType.net フォーム】</title>
    <link rel="alternate" type="text/html" href="https://movabletype.net/blog/2025/05/form-selection-limiter.html" />
    <id>tag:movabletype.net,2003:post-2959717</id>

    <published>2025-05-12T01:00:00Z</published>
    <updated>2025-05-12T04:01:23Z</updated>

    <summary>はじめまして！デザイナーのさいとうです。 今回初めて活用ブログを書かせていただき...</summary>
    <author>
        <name>saito</name>
            </author>
            <category term="機能紹介" scheme="http://www.sixapart.com/ns/types#category" />
            <category term="フォーム" scheme="http://www.sixapart.com/ns/types#category" />
            <content type="html" xml:lang="ja-JP" xml:base="https://movabletype.net/blog/">
        &lt;p&gt;はじめまして！デザイナーのさいとうです。&lt;br&gt;今回初めて活用ブログを書かせていただきます🙌&lt;/p&gt;

&lt;p&gt;お問い合わせやアンケートのフォームで「該当する項目を、3つ選択してください」と、選択できる個数の上限を指定したい時、あると思います。&lt;/p&gt;

&lt;p&gt;CMSサービス「&lt;a href=&quot;https://movabletype.net/&quot; title=&quot;&quot;&gt;MovableType.net&lt;/a&gt;」のフォーム機能ならびに、フォームサービス「&lt;a href=&quot;https://movabletype.net/form/&quot; title=&quot;&quot;&gt;MovableType.net フォーム&lt;/a&gt;」では、複数アイテムを選択できるチェックボックスを利用できます。&lt;/p&gt;

&lt;p&gt;この記事では、その&lt;strong&gt;チェックボックスで選択できるアイテムの最大数を指定する&lt;/strong&gt;ためのカスタマイズ方法についてご紹介します！&lt;/p&gt;

&lt;p&gt;この方法を使えば、もしユーザーが上限数以上に選択したとしても、アラートのメッセージが表示されるので安心です😌&lt;/p&gt;

&lt;p&gt;さっそくやっていきましょう✊&lt;/p&gt;

&lt;hr&gt;

&lt;h2&gt;もくじ&lt;/h2&gt;
&lt;ol&gt;
  &lt;li&gt;&lt;a href=&quot;#case01&quot;&gt;フォームを新規作成&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#case02&quot;&gt;フォームをページに設置する&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#case03&quot;&gt;カスタムスクリプトのテンプレートを作成&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#case04&quot;&gt;カスタムスクリプトのテンプレートを読み込ませる&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#case05&quot;&gt;正常に動くか操作して確認する&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3 id=&quot;case01&quot;&gt;1. フォームを新規作成&lt;/h3&gt;
&lt;p&gt;まずは、チェックボックスを含むフォームを新規作成しましょう。&lt;/p&gt;

&lt;figure style=&quot;display: block; width: fit-content; margin: 0 auto; text-align: center; margin-bottom: 1em;&quot;&gt;&lt;img src=&quot;https://movabletype.net/blog/.assets/forms-check01.png&quot; width=&quot;600&quot; height=&quot;367&quot; alt=&quot;MovableType.net 新規フォーム作成画面のスクリーンショット&quot; class=&quot;asset asset-image at-xid-2024871&quot; style=&quot;display: block;&quot;/&gt;&lt;figcaption style=&quot;width: 100%; box-sizing: border-box;&quot;&gt;MovableType.net 管理画面から、新規フォームを作成&lt;/figcaption&gt;&lt;/figure&gt;

&lt;p&gt;必要項目を入力し、下部にある [保存] ボタンをクリックします。&lt;/p&gt;

&lt;p&gt;今回はチェックボックスをカスタマイズしたいので、[項目変更] で &lt;strong&gt;[チェックボックス]&lt;/strong&gt; の項目を必ず追加してください。&lt;/p&gt;

&lt;figure style=&quot;display: block; width: fit-content; margin: 0 auto; text-align: center; margin-bottom: 1em;&quot;&gt;&lt;img src=&quot;https://movabletype.net/blog/.assets/forms-check02.png&quot; width=&quot;600&quot; height=&quot;367&quot; alt=&quot;&quot; class=&quot;asset asset-image at-xid-2024871&quot; style=&quot;display: block;&quot;/&gt;&lt;figcaption style=&quot;width: 100%; box-sizing: border-box;&quot;&gt;フォーム項目として [チェックボックス] 項目を追加&lt;/figcaption&gt;&lt;/figure&gt;

&lt;p&gt;フォームの作成方法については、マニュアルで詳しく解説しているのでぜひ参考にしてください！&lt;/p&gt;

&lt;div class=&quot;link&quot;&gt;
&lt;a href=&quot;https://movabletype.net/support/form/form-set.html&quot; title=&quot;&quot; target=&quot;_blank&quot;&gt;【マニュアル】フォームの新規作成と設置&lt;/a&gt;
&lt;/div&gt;

&lt;p&gt;フォームが完成しても、設定ページは閉じずそのままにしておきましょう。この後、設定した内容をいくつか使用します。&lt;/p&gt;

&lt;h3 id=&quot;case02&quot;&gt;2. フォームをページに設置する&lt;/h3&gt;

&lt;p&gt;次に、フォームを設置しましょう。フォームを置きたいページの編集画面を開きます。&lt;/p&gt;

&lt;p&gt;今回は「ウェブページ」にアンケートを設置してみます。&lt;/p&gt;

&lt;p&gt;先ほど作成したフォームの管理画面に戻り [基本設定] タブの中にある、埋め込みコードをコピーします。&lt;/p&gt;

&lt;figure style=&quot;display: block; width: fit-content; margin: 0 auto; text-align: center; margin-bottom: 1em;&quot;&gt;&lt;img src=&quot;https://movabletype.net/blog/.assets/forms-check03.png&quot; width=&quot;600&quot; height=&quot;367&quot; alt=&quot;&quot; class=&quot;asset asset-image at-xid-2024871&quot; style=&quot;display: block;&quot;/&gt;&lt;figcaption style=&quot;width: 100%; box-sizing: border-box;&quot;&gt;[埋め込みコード] 内のコードをコピーします&lt;/figcaption&gt;&lt;/figure&gt;

&lt;p&gt;アンケートを設置するウェブページに、コピーした埋め込みコードを貼り付けます。フォーマットは [なし] もしくは、ブロックエディタの [HTML] ブロックとして貼り付けてください。&lt;/p&gt;

&lt;figure style=&quot;display: block; width: fit-content; margin: 0 auto; text-align: center; margin-bottom: 1em;&quot;&gt;&lt;img src=&quot;https://movabletype.net/blog/.assets/forms-check04.png&quot; width=&quot;600&quot; height=&quot;367&quot; alt=&quot;&quot; class=&quot;asset asset-image at-xid-2024871&quot; style=&quot;display: block;&quot;/&gt;&lt;figcaption style=&quot;width: 100%; box-sizing: border-box;&quot;&gt;ウェブページの編集画面で、埋め込みコードを貼り付ける&lt;/figcaption&gt;&lt;/figure&gt;

&lt;p&gt;[公開] ボタンを押すと、作成したフォームがページに表示されます。実際のウェブページを確認しましょう。&lt;/p&gt;

&lt;figure style=&quot;display: block; width: fit-content; margin: 0 auto; text-align: center; margin-bottom: 1em;&quot;&gt;&lt;img src=&quot;https://movabletype.net/blog/.assets/forms-check05.png&quot; width=&quot;600&quot; height=&quot;625&quot; alt=&quot;&quot; class=&quot;asset asset-image at-xid-2024871&quot; style=&quot;display: block;&quot;/&gt;&lt;figcaption style=&quot;width: 100%; box-sizing: border-box;&quot;&gt;アンケートフォームをページに埋め込んだ例&lt;/figcaption&gt;&lt;/figure&gt;

&lt;p&gt;この時点では、「作品の良かった点」をいくらでも選択できる状態です。&lt;/p&gt;

&lt;h3 id=&quot;case03&quot;&gt;3. カスタムスクリプトのテンプレートを作成&lt;/h3&gt;

&lt;p&gt;いよいよ本題のカスタマイズ設定を行ないます！作品の良かった点を &lt;strong&gt;最大3つまで&lt;/strong&gt; 指定できるように設定していきましょう。&lt;/p&gt;

&lt;p&gt;フォーム用のカスタムスクリプトのテンプレートを作成します。ここでチェックボックスで選択できる数の制限指定や、アラートメッセージなどのバリデーションの設定を行ないます。&lt;/p&gt;

&lt;p&gt;左サイドバーの [デザイン] &gt; [テンプレート] から [インデックス・テンプレート] を新規作成して下記のコードを貼り付けます。&lt;/p&gt;

&lt;pre&gt;&lt;code class=&quot;html&quot;&gt;window.MTNetFormDataLayer = window.MTNetFormDataLayer || [];
function MTNetForm() { MTNetFormDataLayer.push(arguments); }
MTNetForm(&quot;validator&quot;, {
  id: &quot;foo&quot;,
  validator: function(value) {
    if (value.length &amp;lt; 1) {
      return &quot;1つ以上選択してください&quot;;
    }
    if (value.length &amp;gt; 3) {
      return &quot;選択できる項目は最大3つまでです&quot;;
    }
  },
});&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;テンプレートの名前は &lt;code&gt;フォーム選択数の上限指定&lt;/code&gt;、出力ファイルは &lt;code&gt;form_multiple_selection_limiter.js&lt;/code&gt; などにしておきましょう&lt;/p&gt;

&lt;figure style=&quot;display: block; width: fit-content; margin: 0 auto; text-align: center; margin-bottom: 1em;&quot;&gt;&lt;img src=&quot;https://movabletype.net/blog/.assets/forms-check06.png&quot; width=&quot;600&quot; height=&quot;333&quot; alt=&quot;&quot; class=&quot;asset asset-image at-xid-2024871&quot; style=&quot;display: block;&quot;/&gt;&lt;figcaption style=&quot;width: 100%; box-sizing: border-box;&quot;&gt;カスタムスクリプト用のテンプレートを作成&lt;/figcaption&gt;&lt;/figure&gt;

&lt;p&gt;再度、先ほど作成したフォームの管理画面に戻り [項目変更] タブの中にある、チェックボックスの項目を開き &lt;strong&gt;[項目名]&lt;/strong&gt; の内容をコピーします。&lt;/p&gt;

&lt;figure style=&quot;display: block; width: fit-content; margin: 0 auto; text-align: center; margin-bottom: 1em;&quot;&gt;&lt;img src=&quot;https://movabletype.net/blog/.assets/forms-check07.png&quot; width=&quot;600&quot; height=&quot;333&quot; alt=&quot;&quot; class=&quot;asset asset-image at-xid-2024871&quot; style=&quot;display: block;&quot;/&gt;&lt;figcaption style=&quot;width: 100%; box-sizing: border-box;&quot;&gt;フォーム [項目変更] 画面のチェックボックスの [項目名] をコピー&lt;/figcaption&gt;&lt;/figure&gt;

&lt;p&gt;フォーム用のカスタムスクリプトの4行目の&lt;code&gt;id&lt;/code&gt;にある、&lt;code&gt;foo&lt;/code&gt;をコピーした内容に書き換えます。&lt;br&gt;このスクリーンショットの例で言えば、&lt;code&gt;id = 今回の作品でよかった点を選択してください（最大3つまで）&lt;/code&gt;になります。&lt;/p&gt;

&lt;p&gt;9行目の&lt;code&gt;if (value.length &gt; 3)&lt;/code&gt;の&lt;code&gt;3&lt;/code&gt;を変更すると、選択できる上限数を設定できます。&lt;/p&gt;

&lt;p&gt;コード10行目の&lt;code&gt;return&lt;/code&gt;に書かれている&lt;code&gt;選択できる項目は最大3つまでです&lt;/code&gt;の&lt;code&gt;3&lt;/code&gt;の部分も必ず同じ数字に変えてください。アラート時に表示されるメッセージになります。&lt;/p&gt;

&lt;figure style=&quot;display: block; width: fit-content; margin: 0 auto; text-align: center; margin-bottom: 1em;&quot;&gt;&lt;img src=&quot;https://movabletype.net/blog/.assets/forms-check08.png&quot; width=&quot;600&quot; height=&quot;333&quot; alt=&quot;&quot; class=&quot;asset asset-image at-xid-2024871&quot; style=&quot;display: block;&quot;/&gt;&lt;figcaption style=&quot;width: 100%; box-sizing: border-box;&quot;&gt;id の値や選択上限数、アラートメッセージを書き換え&lt;/figcaption&gt;&lt;/figure&gt;

&lt;p&gt;書き換えが完了したら [公開] または [更新] を押します。&lt;/p&gt;

&lt;h3 id=&quot;case04&quot;&gt;4. カスタムスクリプトのテンプレートを読み込ませる&lt;/h3&gt;

&lt;p&gt;最後に、&lt;strong&gt;設定したバリデーションの設定を、作成したフォームに反映させる&lt;/strong&gt;作業を行います。&lt;/p&gt;

&lt;p&gt;フォームを設置したページのテンプレートを開きます。&lt;/p&gt;

&lt;p&gt;今回はウェブページに設置したので、ウェブページのアーカイブ・テンプレートを開きます。&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt; 内に、下記のコードを貼り付けます。&lt;/p&gt;

&lt;pre&gt;&lt;code class=&quot;html&quot;&gt;&amp;lt;script src=&quot;&amp;lt;mt:BlogURL&amp;gt;form_multiple_selection_limiter.js&quot; defer&amp;gt;&amp;lt;/script&amp;gt;&lt;/code&gt;&lt;/pre&gt;

&lt;figure style=&quot;display: block; width: fit-content; margin: 0 auto; text-align: center; margin-bottom: 1em;&quot;&gt;&lt;img src=&quot;https://movabletype.net/blog/.assets/forms-check09.png&quot; width=&quot;600&quot; height=&quot;333&quot; alt=&quot;&quot; class=&quot;asset asset-image at-xid-2024871&quot; style=&quot;display: block;&quot;&gt;&lt;figcaption style=&quot;width: 100%; box-sizing: border-box;&quot;&gt;ウェブページのテンプレートに、今回作ったカスタムスクリプトのjsを埋め込む&lt;/figcaption&gt;&lt;/figure&gt;

&lt;p&gt;&lt;code&gt;form_multiple_selection_limiter.js&lt;/code&gt;と書かれている箇所は、カスタムスクリプトのテンプレートで設定した &lt;strong&gt;[出力ファイル]&lt;/strong&gt; 名を記載してください。&lt;/p&gt;

&lt;p&gt;このコードを埋め込むことで、カスタムスクリプトのテンプレートの内容とフォームを紐づけることができます。&lt;/p&gt;

&lt;p&gt;貼り付けが完了したら、[更新] を押します。&lt;/p&gt;

&lt;p&gt;これで、チェックボックスで選択できる項目の数が制限されているはずです！&lt;/p&gt;

&lt;h3 id=&quot;case05&quot;&gt;5. 正常に動くか動作確認する&lt;/h3&gt;

&lt;p&gt;さっそくウェブページを更新し、動作確認してみましょう！&lt;/p&gt;

&lt;p&gt;指定した数より多く選択して送信すると、アラートメッセージが表示され、送信できない状態になればカスタマイズ成功です！&lt;/p&gt;

&lt;figure style=&quot;display: block; width: fit-content; margin: 0 auto; text-align: center; margin-bottom: 1em;&quot;&gt;&lt;img src=&quot;https://movabletype.net/blog/.assets/forms-check10.png&quot; width=&quot;600&quot; height=&quot;400&quot; alt=&quot;&quot; class=&quot;asset asset-image at-xid-2024871&quot; style=&quot;display: block;&quot;/&gt;&lt;figcaption style=&quot;width: 100%; box-sizing: border-box;&quot;&gt;4項目チェックして送信したら「最大3つまで」のアラートが表示されました&lt;/figcaption&gt;&lt;/figure&gt;

&lt;p&gt;この方法でフォームのチェックボックスの選択数に上限を設けることができます。ぜひお試し下さい！&lt;/p&gt;
        
    </content>
</entry>
<entry>
    <title>かんたんデザイン編集の新機能「画像のリストタイプ」を使ったスライドショーの実装例</title>
    <link rel="alternate" type="text/html" href="https://movabletype.net/blog/2025/04/slideimages.html" />
    <id>tag:movabletype.net,2003:post-2946388</id>

    <published>2025-04-10T02:00:00Z</published>
    <updated>2025-04-10T02:22:25Z</updated>

    <summary>サイトの一部をノーコード編集領域として設定できる「かんたんデザイン編集」機能のア...</summary>
    <author>
        <name>hayase</name>
            </author>
            <category term="機能紹介" scheme="http://www.sixapart.com/ns/types#category" />
            <category term="デザイン" scheme="http://www.sixapart.com/ns/types#category" />
            <content type="html" xml:lang="ja-JP" xml:base="https://movabletype.net/blog/">
        &lt;p class=&quot;mt-be-image&quot;&gt;&lt;img src=&quot;https://movabletype.net/blog/.assets/thumbnail/ogp_20250410-600wri.png&quot; alt=&quot;&quot; width=&quot;600&quot; height=&quot;315&quot; class=&quot;asset asset-image mt-image-center&quot; style=&quot;max-width:100%;height:auto;display:block;margin-left:auto;margin-right:auto&quot;/&gt;&lt;/p&gt;&lt;p&gt;サイトの一部をノーコード編集領域として設定できる「かんたんデザイン編集」機能のアップデートです。リストタイプ編集の選択肢として、画像とファイルが利用できるようになりました。&lt;/p&gt;&lt;p&gt;これまで、editor:resource:type ではウェブページ（page）と記事（entry）の２種類が利用可能でした。今回、新たに画像（image）とファイル（file）を指定できるようになりました。&lt;/p&gt;&lt;p&gt;この記事では、新機能を利用してスライドショーに並べる画像をノーコードで指定できるように実装する方法を紹介します。&lt;/p&gt;&lt;p&gt;かんたんデザイン編集機能については、マニュアルもあわせてご覧ください。&lt;/p&gt;&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://movabletype.net/support/design/easy-design.html&quot;&gt;かんたんデザイン編集&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://movabletype.net/support/design/easy-design-detail.html&quot;&gt;かんたんデザイン編集仕様詳細&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://movabletype.net/support/design/easy-design-sample.html&quot;&gt;かんたんデザイン編集コンポーネント利用例&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;h2&gt;設定パネル側の記述&lt;/h2&gt;&lt;p&gt;まずは、かんたんデザイン編集画面の右側に表示される設定パネルに、スライドショーに表示する画像を指定できるようにする記述を追加しましょう。&lt;/p&gt;&lt;figure class=&quot;mt-be-image mt-figure&quot; style=&quot;display:inline-block&quot;&gt;&lt;img src=&quot;https://movabletype.net/blog/.assets/thumbnail/slide02-450wri.jpg&quot; alt=&quot;&quot; width=&quot;450&quot; height=&quot;420&quot; class=&quot;asset asset-image&quot; style=&quot;max-width:100%;height:auto&quot;/&gt;&lt;figcaption&gt;設定パネルの画像選択項目&lt;/figcaption&gt;&lt;/figure&gt;&lt;p&gt;次のソースコードを、テンプレート内の設定パネル欄に記述します。&lt;/p&gt;&lt;pre&gt;&lt;code class=&quot;html&quot;&gt;&amp;lt;$mt:Var 
 name=&quot;image_ids&quot;
 editor:type=&quot;list&quot;
 editor:resource:type=&quot;image&quot;
 editor:label=&quot;スライドショー画像&quot;
 editor:description=&quot;スライドショーに表示したい画像を指定します。&quot;
 editor:update:selector=&quot;.swiper-slide&quot;
 editor:register=&quot;0&quot;
 editor:update:fetch=&quot;1&quot;
$&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;code&gt;editor:type=&quot;list&quot;&lt;/code&gt;&amp;nbsp;で&amp;nbsp;&lt;code&gt;editor:resource:type=&quot;image&quot;&lt;/code&gt;&amp;nbsp;と指定します。&lt;/p&gt;&lt;h2&gt;テンプレート内への記述&lt;/h2&gt;&lt;p class=&quot;mt-be-image&quot;&gt;&lt;img src=&quot;https://movabletype.net/blog/.assets/thumbnail/slides03-640wri.jpg&quot; alt=&quot;&quot; width=&quot;640&quot; height=&quot;298&quot; class=&quot;asset asset-image&quot; style=&quot;max-width:100%;height:auto;display:block&quot;/&gt;&lt;/p&gt;&lt;p&gt;テンプレート内に記述するソースコードです。&lt;/p&gt;&lt;pre&gt;&lt;code class=&quot;html&quot;&gt;&amp;lt;$mt:Var
  name=&quot;image_ids&quot;
  editor:type=&quot;list&quot;
  editor:resource:type=&quot;image&quot;
  editor:label=&quot;スライドショー画像&quot;
  editor:description=&quot;スライドショーに表示したい画像を指定します。&quot;
  editor:update:selector=&quot;.swiper-slide&quot;
  editor:button:position=&quot;13,0&quot;
  editor:update:fetch=&quot;1&quot;
$&amp;gt;

&amp;lt;div class=&quot;swiper-wrapper&quot;&amp;gt;
  &amp;lt;mt:Assets ids=&quot;$image_ids&quot;&amp;gt;
  &amp;lt;div class=&quot;swiper-slide&quot;&amp;gt;
    &amp;lt;img src=&quot;&amp;lt;$mt:AssetURL$&amp;gt;&quot;&amp;gt;
  &amp;lt;/div&amp;gt;
   &amp;lt;/mt:Assets&amp;gt;
&amp;lt;/div&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;こちらも &lt;code&gt;editor:type=&quot;list&quot;&lt;/code&gt; を設定し &lt;code&gt;editor:resource:type=&quot;image&quot;&lt;/code&gt; を指定するのがポイントです。&lt;/p&gt;&lt;p&gt;選択した画像の id が &lt;code&gt;mt:Var&lt;/code&gt; で変数として保存され、&lt;code&gt;mt:Assets&lt;/code&gt; タグで指定して呼び出す実装になっています。&lt;/p&gt;&lt;p&gt;※ このサンプルコードはかんたんデザイン編集の実装例です。実際にスライドショー形式で表示するためには、スライドショー用のCSSの実装が必要になります。&lt;/p&gt;&lt;p&gt;かんたんデザイン編集画面に戻り、スライドショー部分に表示される編集ボタンを押すと画像を選択できるリストボックスが表示されます。スライドショーに表示する画像を選択し、順番を入れ換えることができます。&lt;/p&gt;&lt;figure class=&quot;mt-be-image mt-figure&quot; style=&quot;display:inline-block&quot;&gt;&lt;img src=&quot;https://movabletype.net/blog/.assets/thumbnail/slides01-640wri.jpg&quot; alt=&quot;&quot; width=&quot;640&quot; height=&quot;436&quot; class=&quot;asset asset-image&quot; style=&quot;max-width:100%;height:auto&quot;/&gt;&lt;figcaption&gt;リストウィンドウ&lt;/figcaption&gt;&lt;/figure&gt;&lt;h2&gt;その他の活用例&lt;/h2&gt;&lt;p&gt;この他にも、PDFファイル埋め込み用のかんたんデザイン機能を用意しておけば、ウェブ制作チームに依頼せずとも現場のメンバーがすぐに切り替えられるようになります。&lt;/p&gt;&lt;p&gt;かんたんデザイン編集機能の新機能、ぜひご活用ください！&lt;/p&gt;
        
    </content>
</entry>
<entry>
    <title>SaaS型本格CMS「MovableType.net」祝10周年！特設サイトを公開しました</title>
    <link rel="alternate" type="text/html" href="https://movabletype.net/blog/2025/02/10th-anniversary.html" />
    <id>tag:movabletype.net,2003:post-2869978</id>

    <published>2025-02-05T02:00:00Z</published>
    <updated>2025-02-05T02:08:55Z</updated>

    <summary>こんにちは！プロダクトマネージャーの早瀬です。 いつも MovableType....</summary>
    <author>
        <name>hayase</name>
            </author>
            <category term="お知らせ" scheme="http://www.sixapart.com/ns/types#category" />
            <content type="html" xml:lang="ja-JP" xml:base="https://movabletype.net/blog/">
        &lt;p&gt;こんにちは！プロダクトマネージャーの早瀬です。&lt;/p&gt;&lt;p&gt;いつも MovableType.net をご利用いただきありがとうございます！&lt;/p&gt;&lt;p&gt;本日2025年2月5日は、MovableType.net が&lt;a href=&quot;https://movabletype.net/2015/02/movabletypenet.html&quot;&gt;正式公開&lt;/a&gt;されてからちょうど10周年となります！！&lt;/p&gt;&lt;p&gt;リリース当初は非常にシンプルな機能のみのサービスでしたが、毎年多くの新機能の追加・機能強化を行い、現在は高機能なウェブサービス型CMSと胸を張って言えるようになりました。&lt;/p&gt;&lt;p&gt;ここまで進化し10年目を迎えられたのは、全てご利用いただいているユーザーの皆様、パートナーの皆様のおかげです！&lt;/p&gt;&lt;p&gt;皆様からいただいたご要望などのフィードバックも、新機能開発に活かしています。&lt;/p&gt;&lt;p&gt;&lt;span&gt;10周年を迎えるにあたって、これまでの機能強化の歩みを振り返る特設サイトを公開しました。サービスをご利用いただいている皆様から集まったメッセージも掲載しています。送っていただいた方、ありがとうございます！&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;c-mrkdwn__br&quot; aria-label=&quot;&quot; data-stringify-type=&quot;paragraph-break&quot;&gt;&lt;/span&gt;&lt;span&gt;ぜひ、特設サイトをご覧ください。&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;mt-be-image&quot;&gt;&lt;a href=&quot;https://movabletype.net/10th_anniversary/&quot; target=&quot;_self&quot;&gt;&lt;img src=&quot;https://movabletype.net/blog/.assets/thumbnail/ogp_20250204-600wri.png&quot; alt=&quot;&quot; width=&quot;600&quot; height=&quot;315&quot; class=&quot;asset asset-image&quot; style=&quot;max-width:100%;height:auto;display:block&quot;/&gt;&lt;/a&gt;&lt;/p&gt;&lt;p class=&quot;link&quot;&gt;&lt;a title=&quot;MovableType.net 10周年特設サイト&quot; href=&quot;https://movabletype.net/10th_anniversary/&quot;&gt;MovableType.net 10周年特設サイト&lt;/a&gt;&lt;/p&gt;&lt;p&gt;これからも次の10年に向けて頑張っていきますので、引き続き MovabeleType.net をよろしくお願いいたします！&lt;/p&gt;
        
    </content>
</entry>
<entry>
    <title>関連記事・ウェブページ機能の出力時にマルチブログ機能を利用して情報を出し分ける方法</title>
    <link rel="alternate" type="text/html" href="https://movabletype.net/blog/2025/01/related-multiblog.html" />
    <id>tag:movabletype.net,2003:post-2859251</id>

    <published>2025-01-17T02:00:00Z</published>
    <updated>2025-02-03T01:46:21Z</updated>

    <summary>記事やウェブページ内に別の記事・ウェブページへの関連付け（リンク）を行うことがで...</summary>
    <author>
        <name>hayase</name>
            </author>
            <category term="機能紹介" scheme="http://www.sixapart.com/ns/types#category" />
            <category term="MTタグ" scheme="http://www.sixapart.com/ns/types#category" />
            <content type="html" xml:lang="ja-JP" xml:base="https://movabletype.net/blog/">
        &lt;p&gt;&lt;span&gt;記事やウェブページ内に別の記事・ウェブページへの関連付け（リンク）を行うことができる、関連記事・ウェブページ機能。&lt;/span&gt;&lt;br&gt;&lt;span&gt;関連付けされた側の記事・ウェブページからも自動的に元の記事・ウェブページに関連付けが行われるため、お互いをリンクさせることでウェブサイトの回遊性が高まります。&lt;/span&gt;&lt;br&gt;&lt;span&gt;リンクさせる以外にも、関連した記事の情報を全て表示させることもできます。&lt;/span&gt;&lt;br&gt;&lt;span&gt;※　関連記事・ウェブページ機能は、スタンダードプランから利用できます。&lt;/span&gt;&lt;/p&gt;&lt;p&gt;今回は、テンプレート出力時にマルチブログ機能を利用して、情報を出し分ける方法を紹介します！&lt;/p&gt;&lt;h2&gt;今回のユースケース&lt;/h2&gt;&lt;p&gt;&lt;span&gt;運営するバスケットボールチームの公式サイトに練習試合を行った報告のニュース記事を書きました。サイト内には、対戦相手のチーム情報を書いたブログと、試合結果詳細を書いたブログがあります。&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;試合報告のニュース記事に、サイト内の別ブログで管理している対戦相手のチーム情報と試合結果詳細へのリンクを追加する、というケースを例に説明します。&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;span&gt;下のスクリーンショット内の「対戦チーム」「試合結果」の項目が、関連記事・ウェブページの出力例です。&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;mt-be-image&quot;&gt;&lt;img src=&quot;https://movabletype.net/blog/.assets/thumbnail/02-600wri.jpg&quot; alt=&quot;関連記事・ウェブページの出力例&quot; width=&quot;600&quot; height=&quot;362&quot; class=&quot;asset asset-image&quot; style=&quot;max-width:100%;height:auto;display:block&quot;/&gt;&lt;/p&gt;&lt;h3&gt;構成&lt;/h3&gt;&lt;ul&gt;
&lt;li&gt;ウェブサイト：練習試合のニュース記事（メインの記事）&lt;/li&gt;
&lt;li&gt;ブログ：試合結果の記事&lt;/li&gt;
&lt;li&gt;ブログ：チーム情報の記事&lt;/li&gt;
&lt;/ul&gt;&lt;h2&gt;関連記事機能の設定&lt;/h2&gt;&lt;p&gt;関連記事機能は、利用したいウェブサイト・ブログの&lt;strong&gt;設定＞投稿&lt;/strong&gt;の&lt;strong&gt;関連記事・ウェブページ&lt;/strong&gt;から設定できます。&lt;/p&gt;&lt;p&gt;今回はウェブサイトの設定で、対象範囲にするブログを試合結果とチーム情報にし、記事を対象としています。&lt;/p&gt;&lt;p class=&quot;mt-be-image&quot;&gt;&lt;img src=&quot;https://movabletype.net/blog/.assets/thumbnail/%E6%8A%95%E7%A8%BF%E8%A8%AD%E5%AE%9A___MT-NET_Basketball___MovableType_net-600wri.jpg&quot; alt=&quot;設定＞投稿の関連記事・ウェブページの設定画面&quot; width=&quot;600&quot; height=&quot;347&quot; class=&quot;asset asset-image&quot; style=&quot;max-width:100%;height:auto;display:block&quot;/&gt;&lt;/p&gt;&lt;h2&gt;ニュース記事で関連記事を設定する&lt;/h2&gt;&lt;p&gt;ウェブサイトのニュース記事の編集画面右下の&lt;strong&gt;関連記事・ウェブページ&lt;/strong&gt;から、チーム情報のブログの記事と試合結果の記事をそれぞれ選択します。これで関連付けは完了です。&lt;/p&gt;&lt;p class=&quot;mt-be-image&quot;&gt;&lt;img src=&quot;https://movabletype.net/blog/.assets/thumbnail/01-c4fb62b1-600wri.jpg&quot; alt=&quot;関連記事・ウェブページの選択画面&quot; width=&quot;600&quot; height=&quot;423&quot; class=&quot;asset asset-image&quot; style=&quot;max-width:100%;height:auto;display:block&quot;/&gt;&lt;/p&gt;&lt;h2&gt;テンプレートへの記述方法&lt;/h2&gt;&lt;p&gt;続いて、実際に記事テンプレートに出力する場合の例を紹介します。&lt;/p&gt;&lt;p&gt;実際のサンプルコードは以下になります。&lt;/p&gt;&lt;pre&gt;&lt;code class=&quot;html&quot;&gt;&amp;lt;mt:If tag=&quot;RelatedEntries&quot;&amp;gt;
&amp;lt;div class=&quot;teams&quot;&amp;gt;
  &amp;lt;h3&amp;gt;対戦チーム&amp;lt;/h3&amp;gt;
  &amp;lt;ul&amp;gt;
  &amp;lt;mt:RelatedEntries include_blogs=&quot;teams&quot;&amp;gt;
    &amp;lt;li&amp;gt;&amp;lt;h4&amp;gt;&amp;lt;mt:EntryTitle&amp;gt;&amp;lt;/h4&amp;gt;
    &amp;lt;mt:If tag=&quot;CustomFieldValue&quot; identifier=&quot;logoimage&quot;&amp;gt;&amp;lt;p&amp;gt;&amp;lt;img src=&quot;&amp;lt;mt:CustomFieldAsset identifier=&quot;logoimage&quot;&amp;gt;&amp;lt;$mt:AssetThumbnailURL width=&quot;480&quot;$&amp;gt;&amp;lt;/mt:CustomFieldAsset&amp;gt;&quot;&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;/mt:If&amp;gt;
    &amp;lt;p&amp;gt;&amp;lt;mt:EntryBody&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;
  &amp;lt;/mt:RelatedEntries&amp;gt;
  &amp;lt;/ul&amp;gt;
&amp;lt;/div&amp;gt;
&amp;lt;div class=&quot;gameresults&quot;&amp;gt;
  &amp;lt;h3&amp;gt;試合結果&amp;lt;/h3&amp;gt;
  &amp;lt;ul&amp;gt;
  &amp;lt;mt:RelatedEntries include_blogs=&quot;gameresults&quot;&amp;gt;
    &amp;lt;li&amp;gt;&amp;lt;a href=&quot;&amp;lt;mt:EntryPermalink&amp;gt;&quot;&amp;gt;
        &amp;lt;time datetime=&quot;&amp;lt;$mt:EntryDate format=&quot;%Y.%m.%d&quot;$&amp;gt;&quot;&amp;gt;&amp;lt;$mt:EntryDate format=&quot;%Y.%m.%d&quot;$&amp;gt;&amp;lt;/time&amp;gt;
        &amp;lt;p class=&quot;title&quot;&amp;gt;&amp;lt;mt:EntryTitle&amp;gt;&amp;lt;/p&amp;gt;
        &amp;lt;/a&amp;gt;
        &amp;lt;p&amp;gt;&amp;lt;mt:CustomFieldValue identifier=&quot;result&quot; /&amp;gt;&amp;lt;/p&amp;gt;
    &amp;lt;/li&amp;gt;
  &amp;lt;/mt:RelatedEntries&amp;gt;
  &amp;lt;/ul&amp;gt;
&amp;lt;/div&amp;gt;
&amp;lt;/mt:If&amp;gt;      &lt;/code&gt;&lt;/pre&gt;&lt;p&gt;今回の一番のポイントは以下のタグになります。&lt;/p&gt;&lt;ul&gt;
&lt;li&gt;&amp;lt;mt:RelatedEntries include_blogs=&quot;teams&quot;&amp;gt;&lt;/li&gt;
&lt;li&gt;&amp;lt;mt:RelatedEntries include_blogs=&quot;gameresults&quot;&amp;gt;&lt;/li&gt;
&lt;/ul&gt;&lt;p class=&quot;mt-be-image&quot;&gt;&lt;img src=&quot;https://movabletype.net/blog/.assets/thumbnail/03-214751d5-600wri.jpg&quot; alt=&quot;&quot; width=&quot;600&quot; height=&quot;310&quot; class=&quot;asset asset-image&quot; style=&quot;max-width:100%;height:auto;display:block&quot;/&gt;&lt;/p&gt;&lt;p&gt;mt:RelatedEntries は関連付けされている記事の一覧を表示するブロックタグです。&lt;strong&gt;モディファイアを何も指定しない場合は、&lt;span&gt;関連する記事全てが表示&lt;/span&gt;&lt;/strong&gt;されます。今回は対戦チームと試合結果の場所でそれぞれ別に表示したいので、絞り込む必要があります。&lt;/p&gt;&lt;p&gt;&amp;nbsp;include_blogs=&quot;teams&quot; はマルチブログ機能のモディファイアで、利用すると特定のブログに絞り込んで表示することができます。&lt;/p&gt;&lt;p&gt;teamsの部分はブログの識別子で、各ブログの&lt;strong&gt;設定＞全般&lt;/strong&gt;の&lt;strong&gt;ブログ設定&lt;/strong&gt;の&lt;strong&gt;識別子&lt;/strong&gt;で指定・確認することができます。&lt;/p&gt;&lt;p&gt;タグの詳細についてはマニュアルをご覧ください。&lt;/p&gt;&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://movabletype.net/tags/2020/05/MTRelatedEntries.html&quot;&gt;MTRelatedEntries&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://movabletype.net/tags/2020/05/MTRelatedPages.html&quot;&gt;MTRelatedPages&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://movabletype.net/tags/multiblog.html&quot;&gt;マルチブログ機能が利用できるテンプレートタグ&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;以上が関連記事・ウェブページで出力時にマルチブログ機能を利用して情報を出し分ける方法の解説でしたが、最後におまけとして今回のチーム情報の管理ついて少し説明したいと思います。&lt;/p&gt;&lt;h2&gt;ブログのテンプレートでは何も出力させずコンテンツ管理のために利用する&lt;/h2&gt;&lt;p&gt;&lt;span&gt;関連記事・ウェブページ機能は、サイト内の記事同士をリンクし回遊動線を作るために使われるのが最も基本的な使い方です。&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;今回はチーム情報のブログには何も出力させず、ウェブサイトの記事で関連したときのみ出力するような方法をとっています。&lt;/span&gt;&lt;/p&gt;&lt;p&gt;チーム情報のブログの記事の編集画面では項目は３つのみになります。&lt;/p&gt;&lt;p class=&quot;mt-be-image&quot;&gt;&lt;img src=&quot;https://movabletype.net/blog/.assets/thumbnail/04-c2f50db3-600wri.jpg&quot; alt=&quot;チーム情報の編集画面&quot; width=&quot;600&quot; height=&quot;342&quot; class=&quot;asset asset-image&quot; style=&quot;max-width:100%;height:auto;display:block&quot;/&gt;&lt;/p&gt;&lt;ul&gt;
&lt;li&gt;タイトル&lt;/li&gt;
&lt;li&gt;チームロゴ画像（画像のカスタムフィールド）&lt;/li&gt;
&lt;li&gt;本文&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;これらの情報をウェブサイトのニュース記事で関連付けた時のみ、全て表示するようにテンプレートを作成しています。&lt;/p&gt;&lt;p&gt;&lt;span&gt;このように関連記事・ウェブページ機能はサイト内リンクの動線を作るだけでなく、情報の埋め込みにも活用できます。ぜひお試しください！&lt;/span&gt;&lt;/p&gt;
        
    </content>
</entry>
<entry>
    <title>エンジニアが解説！新テーマ「Fusion Corporate」制作のポイント（テーマ作成者向け）③ MTテンプレート編</title>
    <link rel="alternate" type="text/html" href="https://movabletype.net/blog/2024/12/fusion-corprate-mtml.html" />
    <id>tag:movabletype.net,2003:post-2776087</id>

    <published>2024-12-26T01:00:00Z</published>
    <updated>2025-05-28T02:44:16Z</updated>

    <summary>はじめに こんにちは！エンジニアのjunです。 去る2024年10月1日、Mov...</summary>
    <author>
        <name>jun</name>
            </author>
            <category term="MTタグ" scheme="http://www.sixapart.com/ns/types#category" />
            <content type="html" xml:lang="ja-JP" xml:base="https://movabletype.net/blog/">
        &lt;h2&gt;はじめに&lt;/h2&gt;&lt;p&gt;こんにちは！エンジニアのjunです。&lt;br&gt;去る2024年10月1日、&lt;a href=&quot;http://movabletype.net/&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;MovableType.net&lt;/a&gt;&lt;span&gt;&amp;nbsp;用の&lt;/span&gt;新テーマ「&lt;a href=&quot;https://theme.movabletype.net/fusioncorporate/&quot;&gt;Fusion Corporate&lt;/a&gt;」を公開しました🎉&lt;/p&gt;&lt;p class=&quot;link&quot;&gt;&lt;a href=&quot;https://theme.movabletype.net/fusioncorporate/&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Fusion Corporate&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;この「&lt;a href=&quot;https://theme.movabletype.net/fusioncorporate/&quot;&gt;Fusion Corporate&lt;/a&gt;」は、デザイン性と更新性のfusion（融合）を目指して制作されたテーマです。&lt;br&gt;更新性（更新しやすさ）の肝となるのが、6月に公開した「&lt;a href=&quot;https://movabletype.net/support/design/easy-design.html&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;かんたんデザイン編集機能&lt;/a&gt;」です！&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;この機能のおかげで、メインページなどのデザイン要素を、運用担当者が自らコードを触らず編集できるのです。&lt;br&gt;いわばノーコード的な機能をアドオンできる便利機能が&lt;strong&gt;&lt;a href=&quot;https://movabletype.net/support/design/easy-design.html&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;かんたんデザイン編集&lt;/a&gt;&lt;/strong&gt;です。この機能の使い方の詳細は、次の2つのリンク先をご覧下さい。&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;link&quot;&gt;&lt;a title=&quot;リンクテキスト&quot; href=&quot;https://movabletype.net/support/design/easy-design-detail.html&quot;&gt;かんたんデザイン編集仕様詳細&lt;/a&gt;&lt;/p&gt;&lt;p class=&quot;link&quot;&gt;&lt;a title=&quot;リンクテキスト&quot; href=&quot;https://movabletype.net/support/design/easy-design-sample.html&quot;&gt;かんたんデザイン編集コンポーネント利用例&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;さて、「&lt;a href=&quot;https://theme.movabletype.net/fusioncorporate/&quot;&gt;Fusion Corporate&lt;/a&gt;」ではかんたんデザイン編集機能を、どの場所でどのように組み込んでいるのでしょうか？&lt;br&gt;この記事は Fusion Corporate のような汎用的なテーマを作りたい人向けに、テーマ実装方法を解説する3回連載記事の最終回。&lt;/span&gt;&lt;/p&gt;&lt;p&gt;「&lt;strong&gt;既存のテーマをかんたんデザイン編集に対応させたい！」「テーマをイチから作ってみたい！」&lt;br&gt;&lt;/strong&gt;そんな時の参考になれば嬉しいです。&lt;/p&gt;&lt;ol&gt;
&lt;li&gt;&lt;a href=&quot;https://movabletype.net/blog/2024/10/fusion-corprate-css.html&quot;&gt;CSS編&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://movabletype.net/blog/2024/11/fusion-corprate-site-editor.html&quot;&gt;かんたんデザイン編集編&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;MTテンプレート編　← 今回はココ！&lt;/li&gt;
&lt;/ol&gt;&lt;p&gt;MTテンプレート編、スタートです！！&lt;/p&gt;&lt;h2&gt;テンプレートの種類&lt;/h2&gt;&lt;p&gt;MovableType.net には、以下の4種類のテンプレートがあります。&lt;br&gt;なお、サーバーにインストールして利用する Movable Type の場合は、もういくつかの種類があります。&lt;/p&gt;&lt;table style=&quot;border-collapse: collapse; width: 99.9511%;&quot; border=&quot;1&quot;&gt;&lt;colgroup&gt;&lt;col style=&quot;width: 33.3333%;&quot;&gt;&lt;col style=&quot;width: 33.3333%;&quot;&gt;&lt;col style=&quot;width: 33.3333%;&quot;&gt;&lt;/colgroup&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;td&gt;種類&lt;/td&gt;
&lt;td&gt;用途&lt;/td&gt;
&lt;td&gt;例&lt;/td&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;1. インデックス・テンプレート&lt;/td&gt;
&lt;td&gt;&amp;nbsp;1つのテンプレートから、1つのページ作成&lt;/td&gt;
&lt;td&gt;メインページ&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2. アーカイブ・テンプレート&lt;/td&gt;
&lt;td&gt;&amp;nbsp;1つのテンプレートから、複数のページを作成&lt;/td&gt;
&lt;td&gt;記事ページ、カテゴリ別記事一覧ページ&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;3. テンプレート・モジュール&lt;/td&gt;
&lt;td&gt;単体ではページを作成しない。共通のパーツを登録し、必要な場所で読み込む&lt;/td&gt;
&lt;td&gt;ヘッダー、フッター&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;4. システムテンプレート&lt;/td&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;td&gt;記事の編集管理画面CSS&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;p&gt;今回の Fusion Corporate では、計17のテンプレートを利用しています。&lt;br&gt;駆け足にはなりますが、まるっとすべて解説していきます！&lt;/p&gt;&lt;h2&gt;インデックス・テンプレートb&lt;/h2&gt;&lt;p&gt;まずはインデックス・テンプレート。&lt;/p&gt;&lt;p&gt;インデックス・テンプレートは計4つです。&lt;br&gt;HTMLファイルの出力に2つ、CSSファイルの出力に2つ利用しています。&lt;/p&gt;&lt;p&gt;余談ですが、MTの大きな特徴として、出力ファイルの形式を柔軟に設定できる点があります。HTMLはもちろん、今回のようにCSSも出力可能です。「JSON形式で記事一覧を出力して、アプリと連動させる」などの応用も簡単です。ぜひ、ご活用を！&lt;/p&gt;&lt;h3&gt;メインページ&lt;/h3&gt;&lt;p&gt;メインページのテンプレートです。&lt;br&gt;「トップページ」や「ホームページ」などと呼ばれることもあるかもしれませんが、サイトのメインになるページのテンプレートです。まあ、、、そのままですね。。。&lt;/p&gt;&lt;p&gt;メインなだけあって、もっとも多くかんたんデザイン編集に対応しているテンプレートです。かんたんデザイン編集については前回の記事で詳細に解説しているので、合わせてご覧ください。&lt;/p&gt;&lt;p class=&quot;link&quot;&gt;&lt;a title=&quot;リンクテキスト&quot; href=&quot;https://movabletype.net/blog/2024/11/fusion-corprate-site-editor.html&quot;&gt;エンジニアが解説！新テーマ「Fusion Corporate」制作のポイント（テーマ作成者向け）② かんたんデザイン編集編&lt;/a&gt;&lt;/p&gt;&lt;p&gt;このテンプレートには、少しマニアックな点があります。&lt;br&gt;それは、&lt;strong&gt;&lt;code&gt;&amp;lt;h1&amp;gt;&lt;/code&gt;タグの扱い&lt;/strong&gt;です。&lt;/p&gt;&lt;p&gt;&lt;code&gt;&amp;lt;h1&amp;gt;&lt;/code&gt;には、&lt;code&gt;.visually-hidden&lt;/code&gt;というクラスがついています。これは Bootstrap の標準クラスで、「&lt;strong&gt;人間の目には見えてほしくないが、機械には読み取ってほしい&lt;/strong&gt;」際に使うクラスです。そう、SEOやアクセシビリティへの対策なのです。&lt;/p&gt;&lt;p&gt;例えば記事ページであれば、タイトルを&lt;code&gt;&amp;lt;h1&amp;gt;&lt;/code&gt;にするのが自然です。&lt;br&gt;一方、メインページはどうでしょうか。デザイン上、&lt;code&gt;&amp;lt;h1&amp;gt;&lt;/code&gt;に相当する要素がない場合も多いのではないかと思います。&lt;/p&gt;&lt;p&gt;解決策として、共通ヘッダーのロゴを &lt;code&gt;&amp;lt;h1&amp;gt;&lt;/code&gt;にするのも一案です。&lt;br&gt;ただ、その場合、先の記事タイトルも&lt;code&gt;&amp;lt;h1&amp;gt;&lt;/code&gt;のため、メインページ以外では&lt;code&gt;&amp;lt;h1&amp;gt;&lt;/code&gt;が複数存在してしまいます。さらに、「そもそもロゴは見出しではないのでは？🤔」となんだかモヤモヤした気持ちになります。&lt;/p&gt;&lt;p&gt;そのような場合には &lt;code&gt;.visually-hidden&lt;/code&gt;を利用して、デザイン上はないかのように扱うのがオススメです。マニアックながら、意外とテッパンな対応なので活用がオススメです！&lt;/p&gt;&lt;h3&gt;記事一覧&lt;/h3&gt;&lt;p&gt;記事の一覧を、新着順に表示するテンプレートです。記事が10件以上ある場合は2ページ、3ページ...と分割されますが、テンプレートは同じです。&lt;/p&gt;&lt;p&gt;実際のコードです。&lt;/p&gt;&lt;pre&gt;&lt;code class=&quot;html&quot;&gt;&amp;lt;mt:Ignore&amp;gt;==================================================
Output
==================================================&amp;lt;/mt:Ignore&amp;gt;
&amp;lt;$mt:Include module=&quot;記事リスト&quot;$&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;4行！&lt;br&gt;最初の3行はコメントなので、実質1行！&lt;/p&gt;&lt;p&gt;後述の「カテゴリ別記事一覧テンプレート」とデザインが共通のため、さらに後述の「記事リスト」モジュールにまとめているのです。&lt;/p&gt;&lt;p&gt;とういうわけで、詳細は後ほど。&lt;/p&gt;&lt;h3&gt;theme.css&lt;/h3&gt;&lt;p&gt;今度はCSSです。&amp;nbsp;&lt;/p&gt;&lt;p&gt;Fusion Corporate では Boostrap@5.3.3 と独自スタイルを併用していますが、その独自スタイルを記述するテンプレートになります。SCSSなどではなく、純粋なCSSです。&lt;/p&gt;&lt;p&gt;CSSの詳細や、Bootstrap とテーマ独自スタイルの線引きについては、本シリーズの第1回に譲りたいと思います。&lt;/p&gt;&lt;p class=&quot;link&quot;&gt;&lt;a title=&quot;リンクテキスト&quot; href=&quot;https://movabletype.net/blog/2024/10/fusion-corprate-css.html&quot;&gt;エンジニアが解説！新テーマ「Fusion Corporate」制作のポイント（テーマ作成者向け）① CSS編&lt;/a&gt;&lt;/p&gt;&lt;h3&gt;bootstrap.css&lt;/h3&gt;&lt;p&gt;インデックス・テンプレートの最後は、 Bootstrap のカスタマイズCSSです。&lt;/p&gt;&lt;p&gt;Bootstrap のコアは&lt;code&gt;assets/vendor/bootstrap.min.css&lt;/code&gt;に配置しています。&lt;br&gt;このカスタマイズファイルは&lt;code&gt;assets/css/bootstrap.css&lt;/code&gt;です。&lt;/p&gt;&lt;p&gt;詳細については、やはり&lt;a href=&quot;https://movabletype.net/blog/2024/10/fusion-corprate-css.html&quot;&gt;シリーズ第1回&lt;/a&gt;をご覧下さい。&lt;/p&gt;&lt;h2&gt;アーカイブ・テンプレート&lt;/h2&gt;&lt;h3&gt;記事&lt;/h3&gt;&lt;p&gt;記事詳細ページのテンプレートです。&lt;/p&gt;&lt;p&gt;非常にシンプルなテンプレートになっていますが、メインページと同様に&lt;code&gt;.visually-hidden&lt;/code&gt;が登場します。&lt;br&gt;記事の公開日に添えるように「記事の公開日」、記事のカテゴリに添えるように「記事のカテゴリ」と記述しています。これもやはり、SEOやアクセシビリティへの対応です。AIの台頭などもあり、機械読み取りを意識しておいて損はないだろうと考えています。&lt;/p&gt;&lt;h3&gt;ウェブページ&lt;/h3&gt;&lt;p&gt;ウェブページのテンプレートです。&lt;/p&gt;&lt;p&gt;記事テンプレートよりもさらにシンプルになっています。記事テンプレートを見て迷われた場合は、ウェブページを基準に、見比べていただくと良いかもしれません。&lt;/p&gt;&lt;h3&gt;カテゴリ一覧&lt;/h3&gt;&lt;p&gt;カテゴリ別記事一覧テンプレートです。&lt;/p&gt;&lt;p&gt;先ほどの記事一覧テンプレートと同様、4行、実質1行になります。&lt;/p&gt;&lt;p&gt;詳細は、後ほど。&lt;/p&gt;&lt;h2&gt;テンプレート・モジュール&lt;/h2&gt;&lt;p&gt;直接出力されるわけではないけれど、サイト内で繰り返し利用されるパーツをまとめたテンプレートです。&lt;br&gt;これらもテンプレートではあるのですが、以下では「モジュール」と呼びたいと思います。&lt;/p&gt;&lt;h3&gt;グローバルナビゲーション&lt;/h3&gt;&lt;p&gt;スマートフォンなどでは上、パソコンなど左に配置される、ナビゲーションだけをまとめたモジュールです。&lt;/p&gt;&lt;p&gt;「レイアウト」モジュールの中で読み込まれます。&lt;/p&gt;&lt;p&gt;ロゴ、ウェブページリスト、ボタンで構成されますが、いずれもかんたんデザイン編集に対応しています。&lt;/p&gt;&lt;h3&gt;フッター&lt;/h3&gt;&lt;p&gt;フッターモジュールです。&lt;br&gt;「グローバルナビゲーション」モジュール同様、「レイアウト」モジュールの中で読み込まれます。&lt;br&gt;これまた同様に、すべての構成要素がかんたんデザイン編集対応です。&lt;/p&gt;&lt;h3&gt;レイアウト&lt;/h3&gt;&lt;p&gt;これまでの公式テーマとFusion Corporate との最も大きな違いは、この「レイアウト」モジュールかもしれません。&lt;/p&gt;&lt;p&gt;大層な言い方をしましたが小難しいことなく、実際に出力する側のテンプレートで &lt;code&gt;&amp;lt;mt:IncludeBlock&amp;gt;&lt;/code&gt;タグを用いているだけです。&lt;br&gt;「全体のHTML構造を把握したい」といった場合は、まさにこのモジュールが役に立つと思います。&lt;/p&gt;&lt;h3&gt;パンくずリスト&lt;/h3&gt;&lt;p&gt;今回のデザインは、ページの先頭と最後にそれぞれパンくずリストがあるデザインのため、モジュールとして登録しています。&lt;/p&gt;&lt;p&gt;パンくずリストはパンくずリストでも、構造化データを&lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt;に挿入したい場合は、新規にモジュールを作成し、後述の「メタ情報」モジュールで読み込む方針がオススメです。&lt;/p&gt;&lt;h3&gt;記事リスト&lt;/h3&gt;&lt;p&gt;インデックス・テンプレートで飛ばした、「記事一覧」テンプレートと「カテゴリ別記事一覧」テンプレートのメインになるモジュールです。&lt;/p&gt;&lt;p&gt;記事のタイトルや日付、リンクなどは「記事アイテム」モジュールとして切り分けています。「記事アイテム」は、メインページテンプレートなどでも利用するためです。&lt;br&gt;モジュールの中でもモジュールは呼び出し可能です。&lt;/p&gt;&lt;h3&gt;メタ情報&lt;/h3&gt;&lt;p&gt;&amp;lt;head&amp;gt; 内のメタタグを全てまとめています。favicon, CSS, JS なども全てこのモジュールです。全ページ共通にしているため、ページごとの細かな変化はこのモジュール内で条件分岐させています。&lt;/p&gt;&lt;h3&gt;共通設定&lt;/h3&gt;&lt;p&gt;その名の通り、サイト全体で共通の設定をまとめたモジュールです。&lt;br&gt;より具体的には「かんたんデザイン編集の設定」です。&lt;/p&gt;&lt;h3&gt;記事アイテム&lt;/h3&gt;&lt;p&gt;記事ページへの導線となるHTML要素をまとめたモジュールです。&lt;br&gt;メインページ、記事一覧、カテゴリ別一覧で利用するため、共通化しています。&lt;/p&gt;&lt;p&gt;呼び出す際にオプションを指定することで、見出しレベルを変更することが可能です。&lt;/p&gt;&lt;pre&gt;&lt;code class=&quot;html&quot;&gt;// 記事タイトルを h3 で囲う
&amp;lt;$mt:Include module=&quot;記事アイテム&quot; title_tag=&quot;h3&quot;$&amp;gt;

// 何も指定がなければ、記事タイトルを h2 で囲う
&amp;lt;$mt:Include module=&quot;記事アイテム&quot;$&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;h3&gt;ウェブページアイテム&lt;/h3&gt;&lt;p&gt;記事アイテム同様、ウェブページへの導線をつくるためのモジュールです。&lt;br&gt;記事アイテムを比較すると、サムネイル画像を利用できるため、少し要素が増えています。&lt;br&gt;呼び出されるのはメインページのみですが、コードを見やすくするために切り出しています。&lt;/p&gt;&lt;p&gt;こちらも、見出しレベルを変更可能です。&lt;/p&gt;&lt;h2&gt;システムテンプレート&lt;/h2&gt;&lt;h3&gt;エディタCSS&lt;/h3&gt;&lt;p&gt;いよいよ最後、エディタCSSテンプレートです。&lt;/p&gt;&lt;p&gt;これは最後らしく特殊で、記事やウェブページの編集管理画面のためのCSSです。&lt;br&gt;管理画面での本文を、公開時のスタイルに近づけるためのCSSです。&lt;/p&gt;&lt;p&gt;必要なCSSを @import で読み込みつつ、細かなスタイルを追記してます。&lt;/p&gt;&lt;h2&gt;まとめ&lt;/h2&gt;&lt;p&gt;3回目の今回も、やはーーーり長ーーーい記事になってしまいました。&lt;br&gt;ただ、お伝えしたいことは余すことなく詰め込みました。&lt;br&gt;前回、前々回ともども、テーマ作成の一助になれれば嬉しいです。&lt;/p&gt;&lt;p&gt;ぜひ、MovableType.netと新テーマ「Fusion Corporate」をご活用ください！&lt;/p&gt;
        
    </content>
</entry>
<entry>
    <title>バスケチームの公式サイト＆メンバー向け試合結果ページを作れる MovableType.net 用データを無料配布！</title>
    <link rel="alternate" type="text/html" href="https://movabletype.net/blog/2024/12/basketball.html" />
    <id>tag:movabletype.net,2003:post-2847829</id>

    <published>2024-12-19T02:00:00Z</published>
    <updated>2024-12-25T02:58:36Z</updated>

    <summary>こんにちは！プロダクトマネージャーの早瀬です。 今回は、Movable Type...</summary>
    <author>
        <name>hayase</name>
            </author>
            <category term="デザイン" scheme="http://www.sixapart.com/ns/types#category" />
            <category term="運用" scheme="http://www.sixapart.com/ns/types#category" />
            <content type="html" xml:lang="ja-JP" xml:base="https://movabletype.net/blog/">
        &lt;p class=&quot;mt-be-image&quot;&gt;&lt;img src=&quot;https://movabletype.net/blog/.assets/thumbnail/ogp_20241225-600wri.png&quot; alt=&quot;&quot; width=&quot;600&quot; height=&quot;315&quot; class=&quot;asset asset-image&quot; style=&quot;max-width:100%;height:auto;display:block&quot;/&gt;&lt;/p&gt;&lt;p&gt;こんにちは！プロダクトマネージャーの早瀬です。&lt;/p&gt;&lt;p&gt;今回は、&lt;a href=&quot;https://adventar.org/calendars/10274&quot;&gt;Movable Type Advent Calendar 2024&lt;/a&gt; の12/19の記事として公開します！&lt;/p&gt;&lt;p&gt;私の娘たちは小学校・中学校のバスケットボールチームに所属しています。&lt;/p&gt;&lt;p&gt;ミニバスだと団員が最低10人必要なのですが、集めるのに苦戦しているチームが多いと聞きます。にも関わらず、中学のクラブチームでさえ、ウェブサイトを持っているところは非常に少なく、Instagramのみというところが多いです。&lt;/p&gt;&lt;p&gt;個人的にはクラブチームにウェブサイトは必須だと思っているので、数年前からむすめ達が所属するミニバスチームのウェブサイトを Movable Type で運営しています。その結果、市外からの問い合わせも増えて、現在は60人近くの団員が集まりました。&lt;/p&gt;&lt;p&gt;また、試合結果を内部向けに掲載するブログもあわせて運用することによって、プレイ動画を見直しチーム力アップに繋がっています。&lt;/p&gt;&lt;p&gt;今回はその運用ノウハウも含めて、バスケットボールチームのウェブサイトと試合結果を掲載するブログをパッケージ化したものを、MovableType.net のバックアップデータとして配布します！&lt;/p&gt;&lt;p&gt;もちろんMovableType.netの標準テーマをベースにしていますので、すべてレスポンシブレイアウトでスマートフォンにも対応しています！&lt;/p&gt;&lt;h2&gt;バックアップデータを利用し新規作成したウェブサイトで復元する&lt;/h2&gt;&lt;p&gt;まず、バックアップデータを利用するとどういうサイトができるかというと、、、データ元のサイトはこちらになります！&lt;/p&gt;&lt;p class=&quot;mt-be-image&quot;&gt;&lt;img src=&quot;https://movabletype.net/blog/.assets/thumbnail/%E3%83%8F%E3%82%99%E3%82%B9%E3%82%B1%E3%83%81%E3%83%BC%E3%83%A0-600wri.png&quot; alt=&quot;&quot; width=&quot;600&quot; height=&quot;417&quot; class=&quot;asset asset-image&quot; style=&quot;max-width:100%;height:auto;display:block&quot;/&gt;&lt;/p&gt;&lt;p class=&quot;link&quot;&gt;&lt;a title=&quot;MT-NET Basketball&quot; href=&quot;https://basketball.movabletype.io/&quot;&gt;MT-NET Basketball&lt;/a&gt;&lt;/p&gt;&lt;p&gt;構成としては、ウェブサイトと配下のブログ1つがセットになっています。&lt;/p&gt;&lt;ul&gt;
&lt;li&gt;ウェブサイト：バスケットボールチームのサイトで最低限必要なコンテンツも入っています&lt;/li&gt;
&lt;li&gt;ブログ：試合結果の動画URLを掲載し、アーカイブすることができます&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;上記サイトを雛形としたバックアップデータは以下よりダウンロードしてください。&lt;/p&gt;&lt;div class=&quot;mt-be-file&quot;&gt;&lt;a href=&quot;https://movabletype.net/blog/.assets/20241218112727.zip&quot;&gt;
  20241218112727.zipをダウンロード
&lt;/a&gt;&lt;/div&gt;&lt;p&gt;アカウントをお持ちでない場合は、アカウントの作成からウェブサイトを作成できます。すでにアカウントをお持ちの場合は、ログイン後のダッシュボードの一番下にある&lt;strong&gt;新しくウェブサイトを作る&lt;/strong&gt;から作成してください。&lt;/p&gt;&lt;p class=&quot;link&quot;&gt;&lt;a title=&quot;アカウントの作成方法 - マニュアル | MovableType.net&quot; href=&quot;https://movabletype.net/support/menu/account.html&quot;&gt;アカウントの作成方法 - マニュアル | MovableType.net&lt;/a&gt;&lt;/p&gt;&lt;p&gt;作成したウェブサイトの左メニューの&lt;strong&gt;ツール＞復元&lt;/strong&gt;から、ダウンロードしたファイルを選択して復元します。&lt;/p&gt;&lt;p class=&quot;mt-be-image&quot;&gt;&lt;img src=&quot;https://movabletype.net/blog/.assets/thumbnail/recover-600wri.png&quot; alt=&quot;&quot; width=&quot;600&quot; height=&quot;400&quot; class=&quot;asset asset-image&quot; style=&quot;max-width:100%;height:auto;display:block&quot;/&gt;&lt;/p&gt;&lt;p&gt;復元が完了すると、ウェブサイトには元データと同じ内容の記事・ウェブページが作成され同じデザインで表示されます。MT-NET試合結果というブログも作成され、こちらも同じ内容のサンプルコンテンツが作成されています。&lt;/p&gt;&lt;h2&gt;公開用ウェブサイトの編集&lt;/h2&gt;&lt;p&gt;チームの公開用ウェブサイトは、&lt;a href=&quot;https://theme.movabletype.net/fusioncorporate/&quot;&gt;Fusion Corporate&lt;/a&gt;をそのまま利用してかんたんデザイン編集機能で編集しています。&lt;/p&gt;&lt;p&gt;記事でお知らせを更新していき、ウェブページでその他のページを作成しています。ウェブページは以下を作成してサンプルコンテンツを入れていますが、必要に応じて変更してください。&lt;/p&gt;&lt;ul&gt;
&lt;li&gt;練習&lt;/li&gt;
&lt;li&gt;メッセージ&lt;/li&gt;
&lt;li&gt;お問い合わせ&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;お問い合わせページのフォームに関しては、新たに作成しソースコードを挿入してください。&lt;/p&gt;&lt;p class=&quot;link&quot;&gt;&lt;a title=&quot;フォーム - マニュアル | MovableType.net&quot; href=&quot;https://movabletype.net/support/form/&quot;&gt;フォーム - マニュアル | MovableType.net&lt;/a&gt;&lt;/p&gt;&lt;p&gt;テンプレート上で変更が必要な箇所は全てかんたんデザイン編集機能を利用して、ノーコードで変更を行えます。&lt;/p&gt;&lt;p class=&quot;mt-be-image&quot;&gt;&lt;img src=&quot;https://movabletype.net/blog/.assets/thumbnail/%E3%83%8F%E3%82%99%E3%82%B9%E3%82%B1%E3%83%81%E3%83%BC%E3%83%A0_%E3%81%A8_%E8%A8%98%E4%BA%8B%E3%81%AE%E7%B7%A8%E9%9B%86___MovableType_net___MovableType_net_%E6%B4%BB%E7%94%A8%E3%83%95%E3%82%99%E3%83%AD%E3%82%AF%E3%82%99___MovableType_net_%E3%81%A8_-600wri.png&quot; alt=&quot;&quot; width=&quot;600&quot; height=&quot;417&quot; class=&quot;asset asset-image&quot; style=&quot;max-width:100%;height:auto;display:block&quot;/&gt;&lt;/p&gt;&lt;p&gt;使い方に関して詳しくはマニュアルや記事をご覧ください。&lt;/p&gt;&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://movabletype.net/support/theme/about-fusioncorporate.html&quot;&gt;テーマ「Fusion Corporate」の特長と使い方 - マニュアル | MovableType.net&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://movabletype.net/blog/2024/10/fusion-corporate.html&quot;&gt;新テーマ「Fusion Corporate」リリース！ノーコード編集対応＆多彩なカスタムブロック - MovableType.net 活用ブログ&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;h2&gt;試合結果と動画のURLを掲載するブログの使い方&lt;/h2&gt;&lt;p class=&quot;mt-be-image&quot;&gt;&lt;img src=&quot;https://movabletype.net/blog/.assets/thumbnail/MT-NET%E8%A9%A6%E5%90%88%E7%B5%90%E6%9E%9C-600wri.png&quot; alt=&quot;&quot; width=&quot;600&quot; height=&quot;477&quot; class=&quot;asset asset-image&quot; style=&quot;max-width:100%;height:auto;display:block&quot;/&gt;&lt;/p&gt;&lt;p&gt;こちらは標準テーマをベースにして、バスケットボールの試合結果を掲載していくためにカスタマイズしたものになりますので、使い方も詳しく説明していきます。&lt;/p&gt;&lt;h3&gt;内部向けに限定公開を設定する&lt;/h3&gt;&lt;p class=&quot;mt-be-image&quot;&gt;&lt;img src=&quot;https://movabletype.net/blog/.assets/thumbnail/%E5%85%AC%E9%96%8B%E8%A8%AD%E5%AE%9A___%E3%83%8F%E3%82%99%E3%82%B9%E3%82%B1%E3%83%81%E3%83%BC%E3%83%A0___MT-NET%E8%A9%A6%E5%90%88%E7%B5%90%E6%9E%9C___MovableType_net-600wri.png&quot; alt=&quot;&quot; width=&quot;600&quot; height=&quot;363&quot; class=&quot;asset asset-image&quot; style=&quot;max-width:100%;height:auto;display:block&quot;/&gt;&lt;/p&gt;&lt;p&gt;まず、試合結果のブログは内部向けということで限定公開で運営することを推奨します。パスワード等による限定公開についてはマニュアルをご覧ください。&lt;/p&gt;&lt;p class=&quot;link&quot;&gt;&lt;a title=&quot;公開の設定 - マニュアル | MovableType.net&quot; href=&quot;https://movabletype.net/support/setting/settingopen.html&quot;&gt;公開の設定 - マニュアル | MovableType.net&lt;/a&gt;&lt;/p&gt;&lt;h3&gt;ブログの名前を変更する&lt;/h3&gt;&lt;p class=&quot;mt-be-image&quot;&gt;&lt;img src=&quot;https://movabletype.net/blog/.assets/thumbnail/%E5%85%A8%E8%88%AC%E8%A8%AD%E5%AE%9A___%E3%83%8F%E3%82%99%E3%82%B9%E3%82%B1%E3%83%81%E3%83%BC%E3%83%A0___MT-NET%E8%A9%A6%E5%90%88%E7%B5%90%E6%9E%9C___MovableType_net-600wri.png&quot; alt=&quot;&quot; width=&quot;600&quot; height=&quot;296&quot; class=&quot;asset asset-image&quot; style=&quot;max-width:100%;height:auto;display:block&quot;/&gt;&lt;/p&gt;&lt;p&gt;ブログの名前がMT-NET試合結果になっているので、&lt;strong&gt;設定＞全般&lt;/strong&gt;から自チームの名称等に変更します。&lt;/p&gt;&lt;h3&gt;かんたんデザイン編集で必要な箇所を変更する&lt;/h3&gt;&lt;p class=&quot;mt-be-image&quot;&gt;&lt;img src=&quot;https://movabletype.net/blog/.assets/thumbnail/MT-NET%E8%A9%A6%E5%90%88%E7%B5%90%E6%9E%9C-7142eb70-600wri.png&quot; alt=&quot;&quot; width=&quot;600&quot; height=&quot;324&quot; class=&quot;asset asset-image&quot; style=&quot;max-width:100%;height:auto;display:block&quot;/&gt;&lt;/p&gt;&lt;p&gt;簡単デザインでは以下の項目を変更できます。&lt;/p&gt;&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;メインページのフリーテキスト：&lt;/strong&gt;メインページの上部にお知らせしたい内容を自由に記述できるようにしています。&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;インフォメーション：&lt;/strong&gt;右サイドバーの公式ウェブサイトのURLを変更できます。今回のバックアップデータでは、/（スラッシュ）でサイトのトップに遷移するので変更の必要はありません。&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;コピーライト：&lt;/strong&gt;フッターに表示されるので変更してください。&lt;/li&gt;
&lt;/ul&gt;&lt;h3&gt;ウェブページを編集・追加する&lt;/h3&gt;&lt;p class=&quot;mt-be-image&quot;&gt;&lt;img src=&quot;https://movabletype.net/blog/.assets/thumbnail/%E3%82%A6%E3%82%A7%E3%83%95%E3%82%99%E3%83%98%E3%82%9A%E3%83%BC%E3%82%B7%E3%82%99%E3%81%AE%E7%B7%A8%E9%9B%86___%E3%83%8F%E3%82%99%E3%82%B9%E3%82%B1%E3%83%81%E3%83%BC%E3%83%A0___MT-NET%E8%A9%A6%E5%90%88%E7%B5%90%E6%9E%9C___MovableType_net-31060b5e-600wri.png&quot; alt=&quot;&quot; width=&quot;600&quot; height=&quot;276&quot; class=&quot;asset asset-image&quot; style=&quot;max-width:100%;height:auto;display:block&quot;/&gt;&lt;/p&gt;&lt;p&gt;ウェブページは&lt;strong&gt;このサイトについて&lt;/strong&gt;というページを用意していますが、このページを編集するもしくは新しくウェブページを作ることもできます。&lt;/p&gt;&lt;p&gt;&lt;strong&gt;グローバルナビに表示&lt;/strong&gt;のカスタムフィールドにチェックを入れると、上部のナビゲーションにリンクを表示できます。&lt;/p&gt;&lt;p class=&quot;mt-be-image&quot;&gt;&lt;img src=&quot;https://movabletype.net/blog/.assets/thumbnail/MT-NET%E8%A9%A6%E5%90%88%E7%B5%90%E6%9E%9C-f450e17e-400wri.png&quot; alt=&quot;&quot; width=&quot;400&quot; height=&quot;189&quot; class=&quot;asset asset-image&quot; style=&quot;max-width:100%;height:auto;display:block&quot;/&gt;&lt;/p&gt;&lt;h3&gt;試合結果と動画のURLを記事で掲載する&lt;/h3&gt;&lt;p class=&quot;mt-be-image&quot;&gt;&lt;img src=&quot;https://movabletype.net/blog/.assets/thumbnail/%E8%A8%98%E4%BA%8B%E3%81%AE%E7%B7%A8%E9%9B%86___%E3%83%8F%E3%82%99%E3%82%B9%E3%82%B1%E3%83%81%E3%83%BC%E3%83%A0___MT-NET%E8%A9%A6%E5%90%88%E7%B5%90%E6%9E%9C___MovableType_net-600wri.png&quot; alt=&quot;&quot; width=&quot;600&quot; height=&quot;403&quot; class=&quot;asset asset-image&quot; style=&quot;max-width:100%;height:auto;display:block&quot;/&gt;&lt;/p&gt;&lt;p&gt;試合結果は記事で作成してアーカイブしていきますが、フィールドは以下を用意しています。&lt;/p&gt;&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;タイトル：&lt;/strong&gt;大会名、対戦相手、場所などを記述します&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;試合結果：&lt;/strong&gt;主に点数を掲載します&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;第1〜4クォータービデオ：&lt;/strong&gt;それぞれのクォーターの動画のURLを貼り付けます。&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;備考：&lt;/strong&gt;リッチテキストで自由に記述できるようにしているので、イレギュラーな情報など柔軟に掲載することができます。B戦の試合結果や組合せ表の画像のアップなど実際の使い方も様々です。&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;試合の動画はYoutubeにアップすることが多く個別の動画のURLを各クォーターのフィールドに貼り付けるだけで、&lt;strong&gt;第1クォーター&lt;/strong&gt;といったテキストリンクになります。&lt;/p&gt;&lt;p&gt;また、サイトではなく動画の運用の話になりますが、動画はタイムアウトのときも止めずに1Q単位で撮影すると、動画の編集などしなくて済みます。見る方はYoutubeであればスキップするのは簡単なので問題ありません。&lt;/p&gt;&lt;p&gt;試合結果の動画の掲載は頻度も高いと思うので、以下に楽できるか？がポイントになると個人的には思っています。&lt;/p&gt;&lt;p&gt;実際にミニバスで4年運用してきたので、説得力はあるはずです！（笑）&lt;/p&gt;&lt;p&gt;以上　&lt;a href=&quot;https://adventar.org/calendars/10274&quot;&gt;Movable Type Advent Calendar 2024&lt;/a&gt; の12/19の記事でしたが、ぜひ実際に試していただけると嬉しいです。&lt;/p&gt;&lt;p&gt;MovableType.net はアカウント自体は無料で、そのアカウント内で自動課金なく2週間の&lt;a href=&quot;https://movabletype.net/signup/new&quot;&gt;無料トライアル&lt;/a&gt;も自由にできますし、&lt;a href=&quot;https://movabletype.net/inquiry/developer.html&quot;&gt;制作者向け評価ライセンス&lt;/a&gt;（公開用の利用や公開前の開発のための利用はNG、あくまで自分のテスト環境等で利用可能）も用意していますので、じっくり触りたい方はそちらもお申し込みいただければと思います！&lt;/p&gt;
        
    </content>
</entry>
<entry>
    <title>予約枠項目を利用してセミナー受付フォームを作る</title>
    <link rel="alternate" type="text/html" href="https://movabletype.net/blog/2024/12/reserve.html" />
    <id>tag:movabletype.net,2003:post-2826479</id>

    <published>2024-12-03T02:00:00Z</published>
    <updated>2024-12-26T02:32:51Z</updated>

    <summary>フォーム機能に新しく予約枠項目が追加されました。 今回は予約枠項目を利用して、一...</summary>
    <author>
        <name>hayase</name>
            </author>
            <category term="フォーム" scheme="http://www.sixapart.com/ns/types#category" />
            <content type="html" xml:lang="ja-JP" xml:base="https://movabletype.net/blog/">
        &lt;p&gt;フォーム機能に新しく予約枠項目が追加されました。&lt;/p&gt;&lt;p&gt;今回は予約枠項目を利用して、&lt;strong&gt;一度の申し込みで複数人分の予約申し込みができる&lt;/strong&gt;セミナー受付フォーム（申し込み最大20人を想定）を作成してみます！&lt;/p&gt;&lt;h2&gt;予約枠項目の設定&lt;/h2&gt;&lt;p&gt;フォームの項目変更タブの右側の追加可能な項目に予約枠というものがありますので、お名前や連絡先など必要な項目と一緒に追加します。&lt;/p&gt;&lt;p class=&quot;mt-be-image&quot;&gt;&lt;img src=&quot;https://movabletype.net/blog/.assets/thumbnail/reserve02-600wri.jpg&quot; alt=&quot;&quot; width=&quot;600&quot; height=&quot;497&quot; class=&quot;asset asset-image&quot; style=&quot;max-width:100%;height:auto;display:block&quot;/&gt;&lt;/p&gt;&lt;p&gt;予約枠の項目については今回は以下の設定をしています。&lt;/p&gt;&lt;p class=&quot;mt-be-image&quot;&gt;&lt;img src=&quot;https://movabletype.net/blog/.assets/thumbnail/reserve03-600wri.jpg&quot; alt=&quot;&quot; width=&quot;600&quot; height=&quot;570&quot; class=&quot;asset asset-image&quot; style=&quot;max-width:100%;height:auto;display:block&quot;/&gt;&lt;/p&gt;&lt;ul&gt;
&lt;li&gt;項目名：セミナー予約人数&lt;/li&gt;
&lt;li&gt;必須項目：チェック&lt;/li&gt;
&lt;li&gt;初期メッセージ：人数を選択してください&lt;/li&gt;
&lt;li&gt;予約枠の下限：1&lt;/li&gt;
&lt;li&gt;予約枠の上限：5&lt;/li&gt;
&lt;li&gt;予約枠の初期値：空のまま&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;予約枠の上限は5としていますが、例えば残りの予約数が3の場合は選択肢には最大3までしか表示されないようになっています。&lt;/p&gt;&lt;p&gt;&amp;nbsp;補足説明文については工夫をしていて、現在の空き人数と現在の受付状況を表示するようにしています。&lt;/p&gt;&lt;p&gt;受付に関する人数を表示するためには、mt:Var タグが必要になります。&lt;/p&gt;&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&amp;lt;mt:var name=&quot;reservation_slot_count&quot;&amp;gt;&lt;/strong&gt;：現在登録済みの予約枠の件数&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&amp;lt;mt:var name=&quot;remaining_reservation_slot_count&quot;&amp;gt;&lt;/strong&gt;：受付の制限の数から、現在登録済みの予約枠の件数を差し引いた残りの予約数&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&amp;lt;mt:var name=&quot;maximum_entry_count&quot;&amp;gt;&lt;/strong&gt;：受付の上限の数&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;上記のタグを組み合わせて、補足説明分の入力欄のHTML編集ボタンからソースコードを表示し、内容を記述します。&lt;/p&gt;&lt;pre&gt;&lt;code class=&quot;html&quot;&gt;&amp;lt;p&amp;gt;ご本人様とセミナーに一緒に参加されるメンバーの合計人数を選択してください。&amp;lt;/p&amp;gt;
&amp;lt;p&amp;gt;現在の空き人数：&amp;lt;mt:var name=&quot;remaining_reservation_slot_count&quot; /&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;p&amp;gt;現在の受付状況：&amp;lt;mt:var name=&quot;reservation_slot_count&quot; /&amp;gt; / &amp;lt;mt:var name=&quot;maximum_entry_count&quot; /&amp;gt;&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;p class=&quot;mt-be-image&quot;&gt;&lt;img src=&quot;https://movabletype.net/blog/.assets/thumbnail/reserve04-600wri.jpg&quot; alt=&quot;&quot; width=&quot;600&quot; height=&quot;146&quot; class=&quot;asset asset-image&quot; style=&quot;max-width:100%;height:auto;display:block&quot;/&gt;&lt;/p&gt;&lt;p&gt;この記述によって、閲覧者はフォームにアクセスしたタイミングのリアルタイムな状況を確認することができます。&lt;/p&gt;&lt;p class=&quot;mt-be-image&quot;&gt;&lt;img src=&quot;https://movabletype.net/blog/.assets/thumbnail/reserve01-600wri.jpg&quot; alt=&quot;&quot; width=&quot;600&quot; height=&quot;455&quot; class=&quot;asset asset-image&quot; style=&quot;max-width:100%;height:auto;display:block&quot;/&gt;&lt;/p&gt;&lt;h2&gt;受付の制限の設定&lt;/h2&gt;&lt;p&gt;予約枠の項目の設定が終わったら基本設定に戻り、受付の制限を設定します。&lt;/p&gt;&lt;p class=&quot;mt-be-image&quot;&gt;&lt;img src=&quot;https://movabletype.net/blog/.assets/thumbnail/reserve05-600wri.jpg&quot; alt=&quot;&quot; width=&quot;600&quot; height=&quot;241&quot; class=&quot;asset asset-image&quot; style=&quot;max-width:100%;height:auto;display:block&quot;/&gt;&lt;/p&gt;&lt;p&gt;受付件数には今回の上限である&lt;strong&gt;20&lt;/strong&gt;を設定し、制限の対象には先程追加した予約枠の項目名&lt;strong&gt;セミナー予約人数&lt;/strong&gt;が追加されているのでそれを選択して保存をすれば完成です。&lt;/p&gt;&lt;h2&gt;予約枠の件数のリセット&lt;/h2&gt;&lt;p&gt;予約枠の件数は、受付データの画面で「リセット」を実行すると、0件に戻ります。&lt;/p&gt;&lt;p class=&quot;mt-be-image&quot;&gt;&lt;img src=&quot;https://movabletype.net/blog/.assets/thumbnail/383447550-fbcab255-6241-4078-86b8-15e596b50f42-640wri.png&quot; alt=&quot;&quot; width=&quot;640&quot; height=&quot;274&quot; class=&quot;asset asset-image&quot; style=&quot;max-width:100%;height:auto;display:block&quot;/&gt;&lt;/p&gt;&lt;p&gt;以上、フォーム機能に新しく追加された予約枠をぜひ活用してみてください！&lt;/p&gt;
        
    </content>
</entry>
<entry>
    <title>エンジニアが解説！新テーマ「Fusion Corporate」制作のポイント（テーマ作成者向け）② かんたんデザイン編集編</title>
    <link rel="alternate" type="text/html" href="https://movabletype.net/blog/2024/11/fusion-corprate-site-editor.html" />
    <id>tag:movabletype.net,2003:post-2776088</id>

    <published>2024-11-12T02:00:00Z</published>
    <updated>2024-11-12T02:00:01Z</updated>

    <summary>はじめに こんにちは！エンジニアのjunです。 去る2024年10月1日、Mov...</summary>
    <author>
        <name>jun</name>
            </author>
            <category term="MTタグ" scheme="http://www.sixapart.com/ns/types#category" />
            <content type="html" xml:lang="ja-JP" xml:base="https://movabletype.net/blog/">
        &lt;h2&gt;はじめに&lt;/h2&gt;&lt;p&gt;こんにちは！エンジニアのjunです。&lt;br&gt;去る2024年10月1日、&lt;a href=&quot;http://movabletype.net/&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;MovableType.net&lt;/a&gt;&lt;span&gt;&amp;nbsp;用の&lt;/span&gt;新テーマ「&lt;a href=&quot;https://theme.movabletype.net/fusioncorporate/&quot;&gt;Fusion Corporate&lt;/a&gt;」を公開しました🎉&lt;/p&gt;&lt;p class=&quot;link&quot;&gt;&lt;a href=&quot;https://theme.movabletype.net/fusioncorporate/&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Fusion Corporate&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;この「&lt;a href=&quot;https://theme.movabletype.net/fusioncorporate/&quot;&gt;Fusion Corporate&lt;/a&gt;」は、デザイン性と更新性のfusion（融合）を目指して制作されたテーマです。&lt;br&gt;更新性（更新しやすさ）の肝となるのが、6月に公開した「&lt;a href=&quot;https://movabletype.net/support/design/easy-design.html&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;かんたんデザイン編集機能&lt;/a&gt;」です！&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;この機能のおかげで、トップページなどのデザイン要素を、運用担当者が自らコードを触らず編集できるのです。&lt;br&gt;いわばノーコード的な機能をアドオンできる便利機能が&lt;strong&gt;&lt;a href=&quot;https://movabletype.net/support/design/easy-design.html&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;かんたんデザイン編集&lt;/a&gt;&lt;/strong&gt;です。この機能の使い方の詳細は、次の2つのリンク先をご覧下さい。&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;link&quot;&gt;&lt;a title=&quot;リンクテキスト&quot; href=&quot;https://movabletype.net/support/design/easy-design-detail.html&quot;&gt;かんたんデザイン編集仕様詳細&lt;/a&gt;&lt;/p&gt;&lt;p class=&quot;link&quot;&gt;&lt;a title=&quot;リンクテキスト&quot; href=&quot;https://movabletype.net/support/design/easy-design-sample.html&quot;&gt;かんたんデザイン編集コンポーネント利用例&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;さて、「&lt;a href=&quot;https://theme.movabletype.net/fusioncorporate/&quot;&gt;Fusion Corporate&lt;/a&gt;」ではかんたんデザイン編集機能を、どの場所でどのように組み込んでいるのでしょうか？&lt;br&gt;この記事は Fusion Corporate のような汎用的なテーマを作りたい人向けに、テーマ実装方法を解説する3回連載記事の第2回目です。かんたんデザイン編集機能の実装について解説します。&lt;/span&gt;&lt;/p&gt;&lt;p&gt;「&lt;strong&gt;既存のテーマをかんたんデザイン編集に対応させたい！」「テーマをイチから作ってみたい！」&lt;br&gt;&lt;/strong&gt;そんな時の参考になれば嬉しいです。&lt;/p&gt;&lt;ol&gt;
&lt;li&gt;&lt;a href=&quot;https://movabletype.net/blog/2024/10/fusion-corprate-css.html&quot;&gt;CSS編&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;かんたんデザイン編集編　← 今回はココ！&lt;/li&gt;
&lt;li&gt;MTテンプレート編&lt;/li&gt;
&lt;/ol&gt;&lt;p&gt;さあ、かんたんデザイン編集編、スタートです！！&lt;/p&gt;&lt;h2&gt;1行のテキストを設定する&lt;/h2&gt;&lt;p&gt;&lt;span&gt;まずは最も基本的な、ページ内の特定の1行を編集するための実装方法を見ていきましょう。&lt;/span&gt;&lt;br&gt;&lt;span&gt;「Fusion Corporate」では、フッターのコピーライトなどで、1行のテキストフィールドを利用しています。&lt;/span&gt;&lt;/p&gt;&lt;p&gt;コピーライトでは、以下のような記述になっています。&lt;/p&gt;&lt;pre&gt;&lt;code class=&quot;html&quot;&gt;// footer.mtml
&amp;lt;p class=&quot;text-md-end small mb-0&quot;&amp;gt;
  &amp;lt;mt:Var
    name=&quot;theme_copyright&quot;
    editor:label=&quot;コピーライト&quot;
    editor:type=&quot;contenteditable&quot;
    editor:mode=&quot;text&quot;
    default=&quot;©2003 EXAMPLE INC.&quot;
    editor:button:mode=&quot;before&quot;
    editor:update:required=&quot;1&quot;
    editor:button:position=&quot;-10,-15&quot;
  &amp;gt;
&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre&gt;&lt;code class=&quot;html&quot;&gt;// footer_settings.mtml
&amp;lt;mt:Var
  name=&quot;theme_copyright&quot;
  editor:label=&quot;コピーライト&quot;
  editor:type=&quot;text&quot;
  editor:mode=&quot;editor&quot;
  editor:update:required=&quot;1&quot;
  default=&quot;©2003 EXAMPLE INC.&quot;
  editor:register=&quot;0&quot;
&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;code&gt;footer.mtml&lt;/code&gt;は、最終的なHTMLを出力するテンプレートになるため、クラスのついた&lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt;タグで囲っています。&lt;br&gt;&lt;code&gt;footer_settings.mtml&lt;/code&gt;&lt;span&gt;は、管理画面の入力欄の定義です。装飾のためのHTMLタグなどはありません。&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;一番重要なのは、両者の&lt;/span&gt;&lt;code&gt;name=&quot;theme_copyright&quot;&lt;/code&gt;&lt;span&gt;属性を揃える点です。&lt;br&gt;実際にテーマを作成する際は、&lt;br&gt;まずは settings にて変数定義を行い、&lt;br&gt;次に出力させたい箇所で呼び出す、といった流れをイメージしていただくと良いかもしれません。&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;code&gt;default=&quot;©2003 EXAMPLE INC.&quot;&lt;/code&gt;&lt;span&gt;も、それぞれへ記述する必要があります。&lt;br&gt;なお、ソフトウェア版 Movable Type の グローバルモディファイア&lt;/span&gt;&lt;code&gt;_default&lt;/code&gt;&lt;span&gt;とは異なり、アンダースコアはないためご注意ください。&lt;/span&gt;&lt;/p&gt;&lt;p&gt;共通点もある一方、&lt;code&gt;editor:type&lt;/code&gt;の内容には差があります。&lt;br&gt;&lt;code&gt;footer.mtml&lt;/code&gt;では&lt;code&gt;contenteditable&lt;/code&gt;を指定しているため、要素を直接編集可能になります。&lt;/p&gt;&lt;p class=&quot;mt-be-image&quot;&gt;&lt;img src=&quot;https://movabletype.net/blog/.assets/f9d30e8f0d3e02d88666a0878daffe9a.gif&quot; alt=&quot;「かんたんデザイン編集」機能で、1行テキストフィールドを更新するデモンストレーション&quot; width=&quot;350&quot; height=&quot;116&quot; class=&quot;asset asset-image mt-image-center&quot; style=&quot;max-width:100%;height:auto;display:block;margin-left:auto;margin-right:auto&quot;/&gt;&lt;/p&gt;&lt;h3&gt;モディファイアは1行に1つ&lt;/h3&gt;&lt;p&gt;余談ですが、MTタグのモディファイアは1行に1つずつ、複数の行にわたって記述しています。 これは、人気のJavaScriptフレームワーク Vue.js を参考にしています。 公式スタイルガイドには、以下のように記されています。&lt;/p&gt;&lt;blockquote&gt;
&lt;p&gt;JavaScript では、複数のプロパティをもつ要素を複数の行に分けて書くことはよい慣習だと広く考えられています。なぜなら、その方がより読みやすいからです。Vue のテンプレートや JSX も同じように考えることがふさわしいです。&lt;/p&gt;
&lt;/blockquote&gt;&lt;p class=&quot;link&quot;&gt;&lt;a title=&quot;リンクテキスト&quot; href=&quot;https://ja.vuejs.org/style-guide/rules-strongly-recommended.html#multi-attribute-elements&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Vue.jsスタイルガイド&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;MTテンプレートでも同じように行を分けて書くほうが読みやすいと考え、Vue.jsのスタイルを踏襲しています。&lt;/span&gt;&lt;/p&gt;&lt;h2&gt;複数行のテキストを設定する&lt;/h2&gt;&lt;p&gt;閑話休題。&lt;/p&gt;&lt;p&gt;続けて、複数行テキストフィールドについて。&lt;/p&gt;&lt;p&gt;先ほどと同様、フッターの「連絡先」を例にしたいと思います。&lt;br&gt;「連絡先」以外には、メインページのキャッチコピーなどで利用しています。&lt;/p&gt;&lt;pre&gt;&lt;code class=&quot;html&quot;&gt;// footer.mtml
&amp;lt;address class=&quot;mb-0 theme-prose theme-block-margin-0&quot;&amp;gt;
  &amp;lt;mt:Var
    name=&quot;theme_address&quot;
    editor:label=&quot;連絡先&quot;
    editor:type=&quot;contenteditable&quot;
    editor:editor=&quot;richtext&quot;
    editor:mode=&quot;text&quot;
    default=&quot;&amp;lt;p&amp;gt;〒123-4567&amp;lt;br&amp;gt;○○県△△市□□町1-23-45&amp;lt;br&amp;gt;◇◇ビル 6階&amp;lt;/p&amp;gt;&quot;
    editor:button:mode=&quot;before&quot;
    editor:update:required=&quot;1&quot;
    editor:button:position=&quot;-10,-15&quot;
  &amp;gt;
&amp;lt;/address&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre&gt;&lt;code class=&quot;html&quot;&gt;// footer_settings.mtml
&amp;lt;mt:Var
  name=&quot;theme_address&quot;
  editor:label=&quot;連絡先&quot;
  editor:type=&quot;textarea&quot;
  editor:editor=&quot;richtext&quot;
  editor:mode=&quot;editor&quot;
  default=&quot;&amp;lt;p&amp;gt;〒123-4567&amp;lt;br&amp;gt;○○県△△市□□町1-23-45&amp;lt;br&amp;gt;◇◇ビル 6階&amp;lt;/p&amp;gt;&quot;
  editor:update:required=&quot;1&quot;
  editor:register=&quot;0&quot;
&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;1行テキストフィールドと変わらない使い勝手ではないでしょうか。&lt;/p&gt;&lt;p&gt;&lt;code&gt;default&lt;/code&gt;&lt;span&gt;の値に&lt;/span&gt;&lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt;&lt;span&gt;タグまでも含めている点は異なります。&lt;br&gt;&lt;/span&gt;&lt;code&gt;editor:editor=&quot;richtext&quot;&lt;/code&gt;&lt;span&gt;を指定した場合、ユーザーが入力値を変更すると&lt;/span&gt;&lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt;&lt;span&gt;タグも含めた値が保存されます。&lt;br&gt;それと揃えるために&lt;/span&gt;&lt;code&gt;default&lt;/code&gt;&lt;span&gt;にもタグを含めています。&lt;/span&gt;&lt;/p&gt;&lt;h2&gt;リンクを設定する&lt;/h2&gt;&lt;p&gt;リンクを設定したい場合は、1行テキストフィールドを組み合わせて対応します。&lt;br&gt;「Fusion Corporate」では、グローバルナビゲーションのお問い合わせボタンなどで利用しています。&lt;/p&gt;&lt;pre&gt;&lt;code class=&quot;html&quot;&gt;// global_nav.mtml
&amp;lt;a
  class=&quot;btn btn-primary btn-sm fw-bold mb-1 px-3 py-2 w-100 theme-CTA&quot;
  href=&quot;&amp;lt;$mt:Var name=&quot;theme_CTA_button_url&quot; editor:label=&quot;URL&quot; editor:mode=&quot;attribute&quot; editor:type=&quot;text&quot; default=&quot;/contact/&quot;$&amp;gt;&quot;
&amp;gt;
  &amp;lt;mt:Var 
    name=&quot;theme_CTA_button_text&quot;
    editor:label=&quot;テキスト&quot;
    editor:mode=&quot;text&quot;
    editor:type=&quot;contenteditable&quot;
    editor:button:mode=&quot;before&quot;
    default=&quot;お問い合わせ&quot;
    editor:button:position=&quot;-5,-20&quot;
  &amp;gt;
&amp;lt;/a&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre&gt;&lt;code class=&quot;html&quot;&gt;// global_nav_settings.mtml
&amp;lt;mt:Var 
  name=&quot;theme_CTA_button_text&quot;
  editor:label=&quot;テキスト&quot;
  editor:type=&quot;text&quot;
  default=&quot;お問い合わせ&quot;
  editor:register=&quot;0&quot;
&amp;gt;
&amp;lt;mt:Var 
  name=&quot;theme_CTA_button_url&quot;
  editor:label=&quot;URL&quot;
  editor:type=&quot;text&quot;
  default=&quot;/contact/&quot;
  editor:register=&quot;0&quot;
&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;用意したフィールドは2つ。ボタンの文言と、リンク先URLです。&lt;/p&gt;&lt;p&gt;ボタンの文言は、記事冒頭の1行テキストフィールドの例と同様です。&lt;/p&gt;&lt;p&gt;目新しい点は、&lt;code&gt;editor:mode=&quot;attribute&quot;&lt;/code&gt;の登場です。&lt;br&gt;その名前の通り、HTML属性として出力する際の設定です。&lt;code&gt;[href]&lt;/code&gt;として出力する&lt;code&gt;global_nav.mtml&lt;/code&gt;のみ設定し、&lt;code&gt;global_nav_settings.mtml&lt;/code&gt;では設定していません。&lt;/p&gt;&lt;h3&gt;クラス名のCTAとは&lt;/h3&gt;&lt;p&gt;「クラス名に略語は用いない」という方針でいますが、CTAは例外のため、補足です。&lt;/p&gt;&lt;p&gt;CTAとは、&lt;strong&gt;C&lt;/strong&gt;all &lt;strong&gt;t&lt;/strong&gt;o &lt;strong&gt;A&lt;/strong&gt;ction の頭文字です。日本語訳すると「行動喚起」。&lt;br&gt;例えば「お問い合わせ」や「ログイン」、「無料トライアル」など、サイト訪問者に次に起こして欲しい行動を喚起させるための導線作りと言えます。fusion corporate のようにボタンリンクの場合は、「CTAボタン」などと呼ばれることも多いですね。&lt;/p&gt;&lt;h2&gt;画像を設定する&lt;/h2&gt;&lt;p&gt;画像フィールドは、ロゴ画像の入力欄などで登場します。&lt;br&gt;ここらから少し見慣れない記述が増えてくるかもしれませんが、出来るだけ丁寧に解説できればと思います。&lt;/p&gt;&lt;p&gt;まずは実際のコード。&lt;br&gt;ここでも、フッターを例にします。&lt;/p&gt;&lt;pre&gt;&lt;code class=&quot;html&quot;&gt;// footer.mtml
&amp;lt;p class=&quot;fs-4 m-0 theme-footer-logo MTSE-footer-logo&quot;&amp;gt;
  &amp;lt;mt:Var
    name=&quot;theme_footer_logo&quot;
    editor:label=&quot;ロゴ画像&quot;
    editor:type=&quot;image&quot;
    editor:update:attribute=&quot;src&quot;
    editor:update:selector=&quot;.MTSE-footer-logo img&quot;
    editor:if:value=&quot;&amp;lt;img&amp;gt;&quot;
    editor:if:empty=&quot;$theme_name&quot;
    editor:button:position=&quot;-10,-15&quot;
  &amp;gt;
  &amp;lt;!-- mt-site-editor-theme_footer_logo --&amp;gt;
  &amp;lt;mt:If name=&quot;theme_footer_logo&quot;&amp;gt;
    &amp;lt;img
      src=&quot;&amp;lt;mt:Asset id=&quot;$theme_footer_logo&quot;&amp;gt;&amp;lt;$mt:AssetURL$&amp;gt;&amp;lt;/mt:Asset&amp;gt;&quot;
      alt=&quot;&amp;lt;$mt:Var name=&quot;theme_name&quot;$&amp;gt;&quot;
      width=&quot;&amp;lt;mt:Asset id=&quot;$theme_footer_logo&quot;&amp;gt;&amp;lt;$mt:AssetProperty property=&quot;image_width&quot;$&amp;gt;&amp;lt;/mt:Asset&amp;gt;&quot;
      height=&quot;&amp;lt;mt:Asset id=&quot;$theme_footer_logo&quot;&amp;gt;&amp;lt;$mt:AssetProperty property=&quot;image_height&quot;$&amp;gt;&amp;lt;/mt:Asset&amp;gt;&quot;
      decoding=&quot;async&quot;
      fetchPriority=&quot;high&quot;
    &amp;gt;
  &amp;lt;mt:Else&amp;gt;
    &amp;lt;!-- mt-site-editor-theme_footer_logo-if-empty --&amp;gt;
      &amp;lt;$mt:Var name=&quot;theme_name&quot;$&amp;gt;
    &amp;lt;!-- /mt-site-editor-theme_footer_logo-if-empty --&amp;gt;
  &amp;lt;/mt:If&amp;gt;
  &amp;lt;!-- /mt-site-editor-theme_footer_logo --&amp;gt;
&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre&gt;&lt;code class=&quot;html&quot;&gt;// footer_settings.mtml
&amp;lt;$mt:BlogName encode_html=&quot;1&quot; setvar=&quot;theme_name&quot;$&amp;gt;

&amp;lt;mt:Var
  name=&quot;theme_footer_logo&quot;
  editor:label=&quot;ロゴ画像&quot;
  editor:type=&quot;image&quot;
  editor:update:attribute=&quot;src&quot;
  editor:update:selector=&quot;.MTSE-footer-logo img&quot;
  editor:if:value=&quot;&amp;lt;img&amp;gt;&quot;
  editor:if:empty=&quot;$theme_name&quot;
  editor:register=&quot;0&quot;
&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;span&gt;テキストフィールドでは登場しなかった&lt;/span&gt;&lt;code&gt;editor:update:attribute&lt;/code&gt;&lt;span&gt;と&lt;/span&gt;&lt;code&gt;editor:update:selector&lt;/code&gt;&lt;span&gt;にまずは注目です。&lt;br&gt;この2つはセットになります。&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;テキストフィールドとは異なり、&lt;/span&gt;&lt;code&gt;&amp;lt;img&amp;gt;&lt;/code&gt;&lt;span&gt;タグの&lt;/span&gt;&lt;code&gt;[src]&lt;/code&gt;&lt;span&gt;属性を変更したいため、&lt;/span&gt;&lt;code&gt;editor:update:attribute&lt;/code&gt;&lt;span&gt;を設定します。&lt;br&gt;加えて、&lt;/span&gt;&lt;code&gt;editor:update:selector&lt;/code&gt;&lt;span&gt;にて、変更すべき要素を指定します。属性名に selector とあるように、CSSや JavaScript のセレクターが有効です。&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;なお、&lt;/span&gt;&lt;code&gt;.MTSE&lt;/code&gt;&lt;span&gt;の接頭語がついたクラスは、かんたんデザイン編集のプレビュー画面専用クラスです。&lt;br&gt;役割をより明確にすること、スタイルの柔軟性を高めることが目的です。&lt;/span&gt;&lt;/p&gt;&lt;h3&gt;変数に保存される値は、画像のID&lt;/h3&gt;&lt;p&gt;&lt;code&gt;name&lt;/code&gt;&lt;span&gt;属性で指定したMT変数に保存される値は、画像のIDになります。&lt;br&gt;そのため、取り出す際には&lt;/span&gt;&lt;code&gt;&amp;lt;mt:Asset&amp;gt;&lt;/code&gt;&lt;span&gt;タグを用います。&lt;/span&gt;&lt;/p&gt;&lt;h3&gt;mt:Var の位置　＝　編集ボタンの位置&lt;/h3&gt;&lt;p&gt;&lt;span&gt;ここで1つ注意したいのが、出力テンプレートにおける&lt;/span&gt;&lt;code&gt;&amp;lt;mt:Var&amp;gt;&lt;/code&gt;&lt;span&gt;の扱いです。&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;かんたんデザイン編集プレビュー画面では、&lt;/span&gt;&lt;code&gt;&amp;lt;mt:Var&amp;gt;&lt;/code&gt;&lt;span&gt;は、鉛筆アイコンの編集ボタンへ置き換わります。&lt;br&gt;これは、テキストフィールドではあまり意識する必要がなかった点ではないでしょうか。&lt;br&gt;「プレビュー画面だけスタイルが崩れた」とならないように、画像には親要素を設け、その中で&lt;/span&gt;&lt;code&gt;&amp;lt;mt:Var&amp;gt;&lt;/code&gt;&lt;span&gt;を呼び出すと良いと思います。&lt;/span&gt;もちろん、最終的な公開画面では編集ボタンは表示されません。&lt;br&gt;&lt;br&gt;&lt;/p&gt;&lt;h3&gt;画像が未設定の場合の処理&lt;/h3&gt;&lt;p&gt;「Fusion Corporate」では、画像未設定の場合に、ブログタイトルを通常のテキストとして表示させています。画像タグは出力されません。この、未設定の処理が一番わかりにくい箇所かと思います。&lt;/p&gt;&lt;p&gt;画像フィールドに限りませんが、プレビュー画面でのリアルタイム反映の裏では、JavaScript が大きな役割を担っています。&lt;br&gt;そのため、 JavaScript の経験があると動作をイメージしやすいかもしれません。&lt;/p&gt;&lt;p&gt;とはいえ、未設定処理のために JavaScript を書く必要はありません。&lt;br&gt;具体的に追加すべきコードは以下の2つです。&lt;/p&gt;&lt;pre&gt;&lt;code class=&quot;html&quot;&gt;&amp;lt;!-- mt-site-editor-theme_footer_logo --&amp;gt;
&amp;lt;!-- /mt-site-editor-theme_footer_logo --&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre&gt;&lt;code class=&quot;html&quot;&gt;&amp;lt;!-- mt-site-editor-theme_footer_logo-if-empty --&amp;gt;
&amp;lt;!-- /mt-site-editor-theme_footer_logo-if-empty --&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;span&gt;いずれも、開始タグと終了タグのセットです。&lt;br&gt;&lt;/span&gt;&lt;code&gt;theme_footer_logo&lt;/code&gt;&lt;span&gt;の箇所は、&lt;/span&gt;&lt;code&gt;name&lt;/code&gt;&lt;span&gt;で設定した文字列が適用されます。&lt;br&gt;開始と終了のタグで挟まれた内容が、JavaScriptで処理され、画像未設定の場合の条件分岐が行われます。&lt;/span&gt;&lt;/p&gt;&lt;p&gt;MTタグのif文と、JavaScriptのif文の2つを併記するわけです。&lt;br&gt;前者は、ページのロード時に処理されます。公開画面にも影響するため、メインはこちらです。&lt;br&gt;後者は、ページをリロードせずともリアルタイムに処理されます。公開画面には影響せず、あくまでも管理画面のリアルタイム反映のための処理です。&lt;/p&gt;&lt;p&gt;なお、今回は、画像未設定の場合に画像タグを出力しない仕様も、複雑になった理由の1つに思います。&lt;br&gt;もし、「常に画像タグは出力する。画像未設定の場合は、プレースホルダー画像を表示させる」などの仕様になる場合は、以下などで十分かもしれません。&lt;/p&gt;&lt;pre&gt;&lt;code class=&quot;html&quot;&gt;&amp;lt;mt:If name=&quot;theme_footer_logo&quot;&amp;gt;
  &amp;lt;mt:Asset id=&quot;$theme_footer_logo&quot;&amp;gt;&amp;lt;$mt:AssetURL setvar=&quot;theme_footer_logo_src&quot;$&amp;gt;&amp;lt;/mt:Asset&amp;gt;
&amp;lt;mt:Else&amp;gt;
  &amp;lt;$mt:Var name=&quot;theme_footer_logo_src&quot; value=&quot;/path/to/placeholder.svg&quot;$&amp;gt;
&amp;lt;/mt:If&amp;gt;

&amp;lt;img src=&quot;&amp;lt;mt:Var name=&quot;theme_footer_logo_src&quot;&amp;gt;&quot;&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;h2&gt;記事やウェブページのリストを設定する 基本編&lt;/h2&gt;&lt;p&gt;&lt;code&gt;editor:type=&quot;list&quot;&lt;/code&gt;&lt;span&gt;を利用することで、ブログ内の記事やウェブページへのリンクを簡単に作成することができます。 やはりフッターを例に紹介したいと思います。&lt;/span&gt;&lt;/p&gt;&lt;p&gt;なお、メインページや記事一覧ページへのリンクがありますが、これらかんたんデザイン編集の対象外です。テンプレートを書き換えないかぎり、必ず出力されます。ただし、リンクの文言だけはかんたんデザイン編集の「全般設定」から変更可能です。&lt;/p&gt;&lt;pre&gt;&lt;code class=&quot;html&quot;&gt;// footer.mtml
&amp;lt;ul class=&quot;d-flex flex-column flex-sm-row flex-wrap column-gap-5 row-gap-2 list-unstyled m-0 small MTSE-sub-menu&quot;&amp;gt;
  &amp;lt;li&amp;gt;&amp;lt;a href=&quot;&amp;lt;$mt:BlogRelativeURL$&amp;gt;&quot;&amp;gt;&amp;lt;$mt:Var name=&quot;theme_toppage_title&quot; default=&quot;トップページ&quot;$&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
  &amp;lt;li&amp;gt;&amp;lt;a href=&quot;&amp;lt;$mt:BlogRelativeURL$&amp;gt;archive/&quot;&amp;gt;&amp;lt;$mt:Var name=&quot;theme_archive_title&quot; default=&quot;お知らせ&quot;$&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;

  &amp;lt;mt:Var
    name=&quot;theme_sub_menu_items&quot;
    editor:label=&quot;フッターナビゲーションに表示するウェブページ&quot;
    editor:type=&quot;list&quot;
    editor:mode=&quot;editor&quot;
    editor:update:selector=&quot;.MTSE-sub-menu-item&quot;
    editor:update:html=&quot;$theme_sub_menu_item_template&quot;
    editor:update:parent:selector=&quot;.MTSE-sub-menu&quot;
    editor:button:position=&quot;-10,-15&quot;
  &amp;gt;
  &amp;lt;mt:If name=&quot;theme_sub_menu_items&quot;&amp;gt;
    &amp;lt;mt:Pages ids=&quot;$theme_sub_menu_items&quot;&amp;gt;
      &amp;lt;li class=&quot;MTSE-sub-menu-item&quot;&amp;gt;
        &amp;lt;a class=&quot;MTSE-sub-menu-item__title MTSE-sub-menu-item__url&quot; href=&quot;&amp;lt;$mt:PagePermalink$&amp;gt;&quot;&amp;gt;&amp;lt;$mt:PageTitle encode_html=&quot;1&quot;$&amp;gt;&amp;lt;/a&amp;gt;
      &amp;lt;/li&amp;gt;
    &amp;lt;/mt:Pages&amp;gt;
  &amp;lt;/mt:If&amp;gt;
&amp;lt;/ul&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre&gt;&lt;code class=&quot;html&quot;&gt;// footer_settings.mtml
&amp;lt;mt:SetVarBlock name=&quot;theme_sub_menu_item_template&quot;&amp;gt;
  &amp;lt;li class=&quot;MTSE-sub-menu-item&quot;&amp;gt;
    &amp;lt;a class=&quot;text-reset MTSE-sub-menu-item__title MTSE-sub-menu-item__url&quot;&amp;gt;&amp;lt;/a&amp;gt;
  &amp;lt;/li&amp;gt;
&amp;lt;/mt:SetVarBlock&amp;gt;
&amp;lt;mt:Var
  name=&quot;theme_sub_menu_items&quot;
  editor:label=&quot;フッターナビゲーションに表示するウェブページ&quot;
  editor:type=&quot;list&quot;
  editor:mode=&quot;editor&quot;
  editor:update:selector=&quot;.MTSE-sub-menu-item&quot;
  editor:update:html=&quot;$theme_sub_menu_item_template&quot;
  editor:update:parent:selector=&quot;.MTSE-sub-menu&quot;
  editor:register=&quot;0&quot;
&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;code&gt;name&lt;/code&gt;&lt;span&gt;や&lt;/span&gt;&lt;code&gt;editor:label&lt;/code&gt;&lt;span&gt;などの属性は、引き続き同様です。&lt;br&gt;画像で利用した&lt;/span&gt;&lt;code&gt;editor:update:selector&lt;/code&gt;&lt;span&gt;を利用していますが、今回は&lt;/span&gt;&lt;code&gt;editor:update:html&lt;/code&gt;&lt;span&gt;と&lt;/span&gt;&lt;code&gt;editor:update:parent:selector&lt;/code&gt;&lt;span&gt;の、3つがセットになります。&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;code&gt;editor:update:selector&lt;/code&gt;&lt;span&gt;は、挿入したいリンクアイテムのセレクターです。&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;code&gt;editor:update:html&lt;/code&gt;&lt;span&gt;は、今回のように階層を持ったHTML構造を挿入したい場合に利用します。ここでは、一度MT変数に代入しています。&lt;br&gt;ここで注意が必要なのが、&lt;/span&gt;&lt;code&gt;&amp;lt;a&amp;gt;&lt;/code&gt;&lt;span&gt;タグのクラスです。暗黙のルールとして、&lt;/span&gt;&lt;code&gt;editor:update:selector&lt;/code&gt;&lt;span&gt;の値に&lt;/span&gt;&lt;code&gt;__title&lt;/code&gt;&lt;span&gt;と&lt;/span&gt;&lt;code&gt;__url&lt;/code&gt;&lt;span&gt;を連結したクラス名が必須になります。これらがないと、ページタイトルやリンク先が表示されず空になってしまいます。&lt;br&gt;クラスの命名規則は変更できません。また、&lt;/span&gt;&lt;code&gt;editor:update:selector&lt;/code&gt;&lt;span&gt;の子要素である必要があります。以下のように、すべて同じ要素にまとめて指定することはできません。&lt;/span&gt;&lt;/p&gt;&lt;pre&gt;&lt;code class=&quot;html&quot;&gt;&amp;lt;a class=&quot;item item__title item__url&quot;&amp;gt;動作しない&amp;lt;/a&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;h3&gt;変数に保存される値は、ページのID&lt;/h3&gt;&lt;p&gt;&lt;code&gt;name&lt;/code&gt;&lt;span&gt;属性で指定したMT変数に保存される値は、記事やウェブページのIDになります。&lt;br&gt;そのため、取り出す際には&lt;/span&gt;&lt;code&gt;&amp;lt;mt:Entries&amp;gt;&lt;/code&gt;&lt;span&gt;タグや&lt;/span&gt;&lt;code&gt;&amp;lt;mt:Pages&amp;gt;&lt;/code&gt;&lt;span&gt;を用います。&lt;/span&gt;&lt;/p&gt;&lt;h2&gt;記事やウェブページのリストを設定する 応用編&lt;/h2&gt;&lt;p&gt;&lt;span&gt;先ほどの&lt;/span&gt;&lt;code&gt;editor:type=&quot;list&quot;&lt;/code&gt;&lt;span&gt;には、より高度な利用方法があります。&lt;br&gt;&lt;/span&gt;&lt;code&gt;editor:update:fetch=&quot;1&quot;&lt;/code&gt;&lt;span&gt;属性の利用です。&lt;br&gt;「Fusion Corporate」では、メインページの「ピックアップ記事」や「ピックアップウェブページ」で利用します。&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;通常の&lt;/span&gt;&lt;code&gt;editor:type=&quot;list&quot;&lt;/code&gt;&lt;span&gt;では、プレビュー画面のその場でHTMLの断片を作成し画面を更新します。&lt;br&gt;一方、&lt;/span&gt;&lt;code&gt;editor:update:fetch=&quot;1&quot;&lt;/code&gt;を追加すると&lt;span&gt;、プレビュー画面とは別の場所でページ全体をまるっと作成します。その後に、フェッチでページを取得し、必要な箇所を差し替えて画面を更新しているのです。&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;差し替えすべき必要な箇所の指定は&lt;/span&gt;&lt;code&gt;editor:update:selector&lt;/code&gt;&lt;span&gt;で行います。&lt;/span&gt;&lt;/p&gt;&lt;p&gt;使い分けの基準としては、まずはHTML構造の複雑さです。&lt;br&gt;画像を用いた、いわゆるカード型リンクなどの場合には、画像やカスタムフィールドの情報を取得することもあると思います。&lt;br&gt;カスタムフィールドの処理が必要な場合は、フェッチで対応する必要があります。&lt;/p&gt;&lt;p&gt;&lt;span&gt;もうひとつの判断基準は、リスト未設定の場合の処理です。&lt;br&gt;画像と同様、未設定の場合には&lt;/span&gt;&lt;code&gt;&amp;lt;!-- mt-site-editor--if-empty --&amp;gt;&amp;lt;!-- /mt-site-editor--if-empty --&amp;gt;&lt;/code&gt;&lt;span&gt;のタグを利用しますが、これもコードの見通しを悪くする原因になります。&lt;br&gt;未設定の場合は表示を切り替えたい場合は、フェッチの利用が良いと思います。&lt;/span&gt;&lt;/p&gt;&lt;p&gt;フェッチにはデメリットもあります。&lt;br&gt;それは、反映までのタイムラグです。&lt;br&gt;別の場所でページ全体をまるっと作成しているため、どうしても時間がかかります。&lt;br&gt;無闇矢鱈とフェッチするととても重くなってしまう可能性もあるため注意が必要です。&lt;/p&gt;&lt;p&gt;「Fusion Corporate」での実際のコードは以下です。&lt;/p&gt;&lt;pre&gt;&lt;code class=&quot;html&quot;&gt;// index.mtml
&amp;lt;mt:SetVarTemplate name=&quot;theme_webpage_item_template&quot;&amp;gt;
  &amp;lt;$mt:Include module=&quot;ウェブページアイテム&quot; title_tag=&quot;h3&quot;$&amp;gt;
&amp;lt;/mt:SetVarTemplate&amp;gt;

&amp;lt;section class=&quot;MTSE-selected-webpages tw-my-24&quot;&amp;gt;
  &amp;lt;mt:Var
    name=&quot;theme_toppage_selected_webpages&quot;
    editor:label=&quot;ピックアップウェブページ&quot;
    editor:type=&quot;list&quot;
    editor:resource:type=&quot;page&quot;
    editor:update:fetch=&quot;1&quot;
    editor:update:selector=&quot;.MTSE-selected-webpages&quot;
    editor:button:position=&quot;-10,-15&quot;
  &amp;gt;
  &amp;lt;mt:If name=&quot;theme_toppage_selected_webpages&quot;&amp;gt;
    &amp;lt;h2 class=&quot;visually-hidden&quot;&amp;gt;ピックアップページ&amp;lt;/h2&amp;gt;

    &amp;lt;div class=&quot;theme-webpages theme-block-columns&quot;&amp;gt;
      &amp;lt;mt:Pages ids=&quot;$theme_toppage_selected_webpages&quot;&amp;gt;
        &amp;lt;$mt:Var name=&quot;theme_webpage_item_template&quot;$&amp;gt;
      &amp;lt;/mt:Pages&amp;gt;
    &amp;lt;/div&amp;gt;
  &amp;lt;mt:Else&amp;gt;
    &amp;lt;mt:If name=&quot;is_site_editor&quot;&amp;gt;
      &amp;lt;h2&amp;gt;ピックアップページ&amp;lt;/h2&amp;gt;
      &amp;lt;p&amp;gt;かんたんデザイン編集で、ピックアップしたいウェブページを設定することができます。&amp;lt;/p&amp;gt;
    &amp;lt;/mt:If&amp;gt;
  &amp;lt;/mt:If&amp;gt;
&amp;lt;/section&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre&gt;&lt;code class=&quot;html&quot;&gt;// index.mtml
&amp;lt;mt:Var
  name=&quot;theme_toppage_selected_webpages&quot;
  editor:label=&quot;ピックアップウェブページ&quot;
  editor:type=&quot;list&quot;
  editor:resource:type=&quot;page&quot;
  editor:update:fetch=&quot;1&quot;
  editor:update:selector=&quot;.MTSE-selected-webpages&quot;
  editor:register=&quot;0&quot;
&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;span&gt;なお、カード型リンクは複数ページで利用するため、テンプレートモジュール「ウェブページアイテム」として切り出して登録していますが、ここでは割愛します。&lt;br&gt;上記例では、&lt;/span&gt;&lt;code&gt;&amp;lt;$mt:Var name=&quot;theme_webpage_item_template&quot;$&amp;gt;&lt;/code&gt;&lt;span&gt;と呼び出すのみです。&lt;/span&gt;&lt;/p&gt;&lt;h2&gt;MTのモディファイアを設定する&lt;/h2&gt;&lt;p&gt;いよいよ、最後です。&lt;br&gt;最後は、かんたんデザイン編集の変更を、MTのモディファイアとして利用する例です。&lt;/p&gt;&lt;p&gt;「Fusion Corporate」では、メインページに新着記事を表示させることができます。&lt;br&gt;この、新着記事の件数を変更できるようにする例です。&lt;/p&gt;&lt;p&gt;かんたんデザイン編集未対応の場合は、以下のようにすれば新着3件を取得できます。&lt;/p&gt;&lt;pre&gt;&lt;code class=&quot;html&quot;&gt;&amp;lt;mt:Entries limit=&quot;3&quot;&amp;gt;
  ...
&amp;lt;/mt:Entries&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;code&gt;limit=&quot;3&quot;&lt;/code&gt;となっている箇所を、かんたんデザイン編集で任意の値へ変更できるようにします。&lt;br&gt;「Fusion Corporate」での実際の例は以下です。&lt;/p&gt;&lt;pre&gt;&lt;code class=&quot;html&quot;&gt;// index.mtml
&amp;lt;section class=&quot;MTSE-latest-entries tw-my-24&quot;&amp;gt;
  &amp;lt;mt:Var
    name=&quot;theme_toppage_latest_entries_limit&quot;
    editor:label=&quot;最新記事の件数&quot;
    editor:type=&quot;number&quot;
    default=&quot;3&quot;
    editor:update:fetch=&quot;1&quot;
    editor:update:selector=&quot;.MTSE-latest-entries&quot;
    editor:button:position=&quot;-10,-15&quot;
  &amp;gt;
  &amp;lt;mt:Unless name=&quot;theme_toppage_latest_entries_limit&quot;&amp;gt;
    &amp;lt;$mt:Var name=&quot;theme_toppage_latest_entries_limit&quot; value=&quot;3&quot;$&amp;gt;
  &amp;lt;/mt:Unless&amp;gt;

  &amp;lt;mt:If name=&quot;theme_toppage_latest_entries_limit&quot; ge=&quot;1&quot;&amp;gt;
    &amp;lt;h2 class=&quot;m-0&quot;&amp;gt;&amp;lt;$mt:Var name=&quot;theme_archive_title&quot; default=&quot;お知らせ&quot;$&amp;gt;&amp;lt;/h2&amp;gt;

    &amp;lt;div class=&quot;theme-entries column-gap-5 my-5 border-top border-bottom&quot;&amp;gt;
      &amp;lt;mt:Entries limit=&quot;$theme_toppage_latest_entries_limit&quot;&amp;gt;
        &amp;lt;$mt:Var name=&quot;theme_entry_item_template&quot;$&amp;gt;
      &amp;lt;/mt:Entries&amp;gt;
    &amp;lt;/div&amp;gt;
  
    &amp;lt;div class=&quot;text-center&quot;&amp;gt;
      &amp;lt;a href=&quot;&amp;lt;$mt:BlogRelativeURL$&amp;gt;archive/&quot; class=&quot;btn btn-outline-primary&quot;&amp;gt;一覧をみる&amp;lt;/a&amp;gt;
    &amp;lt;/div&amp;gt;
  &amp;lt;mt:Else&amp;gt;
    &amp;lt;mt:If name=&quot;is_site_editor&quot;&amp;gt;
      &amp;lt;h2&amp;gt;最新記事&amp;lt;/h2&amp;gt;
      &amp;lt;p&amp;gt;かんたんデザイン編集で、最新記事の件数を設定することができます。&amp;lt;/p&amp;gt;
    &amp;lt;/mt:If&amp;gt;
  &amp;lt;/mt:If&amp;gt;
&amp;lt;/section&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre&gt;&lt;code class=&quot;html&quot;&gt;// index_settings.mtml
&amp;lt;mt:Var
  name=&quot;theme_toppage_latest_entries_limit&quot;
  editor:label=&quot;最新記事の件数&quot;
  editor:type=&quot;number&quot;
  default=&quot;3&quot;
  editor:update:fetch=&quot;1&quot;
  editor:update:selector=&quot;.MTSE-latest-entries&quot;
  editor:update:html=&quot;$theme_entry_item_template&quot;
  editor:register=&quot;0&quot;
&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;span&gt;じつは、一番のポイントは、既出の&lt;/span&gt;&lt;code&gt;editor:update:fetch=&quot;1&quot;&lt;/code&gt;&lt;span&gt;。&lt;br&gt;モディファイアの値を動的に反映させたい場合も、フェッチが必要になります。&lt;/span&gt;&lt;/p&gt;&lt;p&gt;もうひとつのポイントは、&lt;code&gt;&amp;lt;mt:Unless&amp;gt;&lt;/code&gt;&lt;span&gt;タグを登場している点です。&lt;br&gt;これは、テーマのクリーンインストール時など、変数が本当に空っぽの場合への対応です。&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;MTの実装上、&lt;/span&gt;&lt;code&gt;&amp;lt;mt:Var name=&quot;theme_toppage_latest_entries_limit&quot; default=&quot;3&quot;&amp;gt;&lt;/code&gt;&lt;span&gt;だけでは&lt;/span&gt;&lt;code&gt;theme_toppage_latest_entries_limit&lt;/code&gt;&lt;span&gt;変数へ値が保存／格納されないのです。&lt;br&gt;このままでは&lt;/span&gt;&lt;code&gt;&amp;lt;mt:If name=&quot;theme_toppage_latest_entries_limit&quot; ge=&quot;1&quot;&amp;gt;&lt;/code&gt;&lt;span&gt;が&lt;/span&gt;&lt;code&gt;true&lt;/code&gt;&lt;span&gt;になりません。&lt;br&gt;そのため、&lt;/span&gt;&lt;code&gt;&amp;lt;mt:Unless&amp;gt;&lt;/code&gt;&lt;span&gt;を用いて、改めて初期値を設定しています。&lt;/span&gt;&lt;/p&gt;&lt;h2&gt;まとめ&lt;/h2&gt;&lt;p&gt;&lt;span&gt;前回に引き続き、すっかり長文になってしまいました。。。&lt;br&gt;しかし、今回も、お伝えしたいことはしっかり書き切りました。&lt;br&gt;とくに、最後の&amp;nbsp;&lt;/span&gt;&lt;code&gt;&amp;lt;mt:Unless&amp;gt;&lt;/code&gt;&lt;span&gt;&amp;nbsp;を用いた初期値の扱いなどは、私自身がばっちりハマった点でもあります。それを共有することは、とても有意義なことだと信じています。&lt;/span&gt;&lt;/p&gt;&lt;p&gt;ぜひみなさんもテーマ作成へ挑戦してみてください！&lt;/p&gt;
        
    </content>
</entry>
</feed>
