カテゴリのリストを返す関数が sitefinity にあります。
//return list of categories
private IList<ICategory> GetCategoryDataSource() {
var cntManager = new ContentManager(CaseStudyManager.DefaultContentProvider);
IList allCategories = cntManager.GetCategories();
List<ICategory> filteredList = new List<ICategory>();
foreach (ICategory category in allCategories) {
filteredList.Add(category);
}
return filteredList;
}
私が知りたいのは、このリストをソートする方法です。
Sitefinity のカテゴリは、文字列だけでわかる限り、カテゴリに関連付けられている他のフィールドはありません。したがって、次のように各カテゴリに番号を追加する以外に、カテゴリを並べ替えるものはありません。
1 - Legal
2 - Financial
3 - Property
これらのカテゴリが Web サイトに表示されると、少なくとも必要な部分をトリミングできます。
誰でもソートを手伝ってもらえますか?
ありがとうアル