---
title: "ターゲットアイテムのテンプレートを作成します"
slug: "create-a-template-for-target-items"
abstract: "テキストファイルからSitecoreアイテムへのデータマッピング方法:Sitecore Data Exchange Frameworkでターゲットアイテムテンプレートを作成する方法。"
---
# ターゲットアイテムのテンプレートを作成します

このウォークスルーでは、ソーステキストファイルの各行が都市に関する情報を表しています。データ同期プロセスでは、テキストファイルからSitecoreアイテムにデータがマッピングされます。この情報を保存するためには、Sitecoreテンプレートを作成し、テンプレートにアイコンを追加し、データフィールドをテンプレートに割り当てる必要があります。

## テンプレートを作成する

テンプレートを作成するには:

1.  コンテンツエディターで*Templates*に移動します。
    
2.  メニューリボンの **ホーム** タブの **挿入** グループで「 **新しいテンプレート**」をクリックします。
    
    ![New template option on Home tab](https://doc.sitecore.com/api/markdown-image/xp/ja/developers/def/60/data-exchange-framework/images/add-template.png)
    
3.  「 **名前選択** 」ダイアログで、以下の値を入力してください:
    
    **名称**
    
    *City Information*
    
    **ベーステンプレート**
    
    *Templates/System/Templates/Standard Template*
    
4.  **次へ**クリック。
    
    ![Select name dialog with Name and Base template fields filled in](https://doc.sitecore.com/api/markdown-image/xp/ja/developers/def/60/data-exchange-framework/images/select-name-for-city-template.png)
    
5.  **ロケーション**ダイアログで*Templates/User Defined*を選択します。**次へ**をクリックします。確認ダイアログで「**閉じる**」をクリックします。
    
6.  確認ダイアログで **「閉じる**」をクリックしてください。
    

## テンプレートにアイコンを設定してください

アイコンを設定するには:

1.  コンテンツエディタのコンテンツツリーで、例えば*Templates/User Defined/City Information*の新しいテンプレートを選択します。
    
    ![City Information template in content tree](https://doc.sitecore.com/api/markdown-image/xp/ja/developers/def/60/data-exchange-framework/images/new-template-selected3.png)
    
2.  右側のペインの **「コンテンツ** 」タブで、タイトルの横にあるアイコンをクリックしてください。
    
3.  タイトルの隣のアイコンをクリックしてください。
    
    ![City Information icon on Content tab](https://doc.sitecore.com/api/markdown-image/xp/ja/developers/def/60/data-exchange-framework/images/icon3.png)
    
4.  アイコン **変更** ダイアログの **アイコン** フィールドで、例えば Office/32x32/pin.png
    
5.  **OK**をクリックします。
    

## テンプレートにフィールドを追加する

フィールドを追加するには:

1.  新しいテンプレートセクションを追加するには、**ビルダー**タブの「**新しいセクションを追加**」フィールドに「*Data*」と入力してください。
    
2.  **データ**セクションには以下のフィールドを追加します:
    
    名称
    
    種類
    
    共有
    
    **識別子**
    
    Single-Line Text
    
    選ばれました
    
    **国**
    
    Single-Line Text
    
    **都市**
    
    Single-Line Text
    
    読み終えると、そのセクションは次のようになります:
    
    ![Added fields in Data section](https://doc.sitecore.com/api/markdown-image/xp/ja/developers/def/60/data-exchange-framework/images/city-template.png)
    
3.  アイテムを保存してください。