2012-05-24 2 views

답변

-1

특정 노드의 하위 페이지를 기준으로 정렬을 참조 하시겠습니까? 귀하의 질문에 조금 혼동을 의미 ...

어쨌든 당신이 하위 페이지를 정렬하려는 경우; 당신은 다음과 같이 할 수 있습니다.

var eventsNode = @Model.NodeById(1058).orderbydesending("createddate"); 

감사합니다,

Developerjigar

+0

kranberg는 DocumentType의 속성을 정렬하는 것에 대해 묻습니다. –

0
그것은 당신이 정렬하는 방법과 내용에 따라 다르지만 여기에 당신이 그들을 분류하는 방법의 예

: 것을 희망

DocumentType dt = DocumentType.GetByAlias("umbTextpage"); 

//Get the one you want to move to the top. 
var property = dt.PropertyTypes.First(p => p.Alias == "bodyText"); 

//Get the rest. Make sure you have the right TabId. 
var otherProperties = dt.PropertyTypes.Where(p => p.Alias != "bodyText" && p.TabId == 8).ToList(); 

property.SortOrder = 0; 
property.Save(); 

int i = 1; 
foreach (var p in otherProperties) 
{ 
    p.SortOrder = i++; 
    p.Save(); 
} 

TabId를 가져 오는 가장 쉬운 방법은 데이터베이스의 cmsTab 테이블을 보는 것입니다.

관련 문제