참조 항목 가져오기

다른 콘텐츠 유형을 참조하는 참조 데이터 필드를 사용하여 콘텐츠 유형에 대한 참조 항목을 가져올 수 있습니다.

예를 들어, Blog-Post 콘텐츠 유형의 Author 필드는 Author 콘텐츠 유형을 참조합니다. Blog-Post의 콘텐츠 레이아웃에서 contentClient.getItems()는 현재 Blog-Post 항목과 Author 참조 항목의 세부정보를 연관시킵니다.

var author_id = this.contentItemData.data['starter-blog-post_author'].id;
var ids = [author_id];
// Get the author reference item
contentClient.getItems({
                                                        'ids': ids
}).then(function (items) {
                // Use the item
 }, function (error) {
                 // Handle error
});