APIメソッドを介してumbracoからデータを取得する方法についての見通しを得ようとしているだけです。umbraco4.9.xを使用していると思います。
基本的に、DiaryEventItemsと呼ばれるデータ型があり、これにアクセスするには次のコードを使用します。
// Get the ID of the data type
DocumentType DocTypeDiaryEvents = DocumentType.GetByAlias("DiaryEventItems");
// Loop through those items using a foreach at present
foreach (Document DiaryEvent in Document.GetDocumentsOfDocumentType(DocTypeDiaryEvents.Id))
{
// Do whatever I need to
}
したがって、これはうまく機能します。「DiaryEventItems」のコレクション/行を取得しますが、もちろん、umbracoインスタンスからすべてのDiaryEventItemsを取得します。つまり、すべてのサイトに対してです。したがって、明らかにサイトルートノードIDを取得し、ツリーを下に移動して必要な実際のドキュメントタイプを取得する方法がありますが、上記のコードと同様の方法はありますか?
助けてくれてありがとう!