2017-10-13 2 views
0

면도기 하위 구성 요소를 사용하려는 면도날 뷰가 있습니다. 내 주요 면도기 파일이면도기 Html 부분 모델

@inherits Umbraco.Web.Mvc.UmbracoTemplatePage 

<div>@model.Title</div> 

등이

@inherits Umbraco.Web.Mvc.UmbracoTemplatePage<ContentModels.Contentpage> 
@using ContentModels = Umbraco.Web.PublishedContentModels; 

@{ 
    Layout = "master.cshtml"; 
    var components = new List<Bodytext>(); 
    if (Model.Content.Mixed != null && Model.Content.Mixed.Any()) { 
     components = Model.Content.Mixed.Select(e => new Bodytext(e)).ToList(); 
    } 
} 

<div>contentpage</div> 

<ul class="team__employee-list"> 
    @foreach (var component in components){ 
     if (component.IsDocumentType("Banner")) { 
      <li> 
       @component.Title 1 
       @Html.Partial("Components/cmp-banner", component) 
      </li> 
     } 
     if (component.IsDocumentType("BodyText")) { 
      <li> 
       @component.Title 2 
      </li> 
     } 
    } 
</ul> 

내 하위 구성 요소처럼 보이지만, 나는 그것을 알아 냈이 오류를

Parser Error 

Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately. 

Parser Error Message: The 'inherits' keyword is not allowed when a 'model' keyword is used. 


Source Error: 


Line 1: @inherits Umbraco.Web.Mvc.UmbracoTemplatePage 
Line 2: 
Line 3: <div>banner</div> 

답변

0

를 얻을. 그것은

@Model.Content.GetPropertyValue("Title") 
이어야했습니다.