View Article.cshtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@model SimpleDD4T2Application.Models.Component.Article | |
<!-- Article CT View --> | |
<div class="article"> | |
<h2>@Model.Heading</h2> | |
</div> | |
<!-- End Article CT View --> |
View Generic.cshtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@model SimpleDD4T2Application.Models.Page.Generic | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>@Model.PageTitle</title> | |
</head> | |
<body> | |
<!-- Page Metadata Keywords --> | |
<div class="keywords"> | |
@foreach (var keyword in Model.Keywords) |
View test.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Test</title> | |
</head> | |
<body> | |
<!-- Page Metadata Keywords --> | |
<div class="keywords"> | |
<span class="keyword">test</span> | |
<span class="keyword">dd4t</span> |
View web.config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<add key="DD4T.ComponentPresentationController" value="Component" /> | |
<add key="DD4T.ComponentPresentationAction" value="ComponentModel" /> |
View Generic.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[PageViewModel(TemplateTitle = "Generic")] | |
public class Generic : ViewModelBase | |
{ | |
[PageTitle] | |
public string PageTitle { get; set; } | |
[TextField(IsMetadata = true)] | |
public List<string> Keywords { get; set; } | |
[ComponentPresentations] |
View Article.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ContentModel("article", true)] | |
public class Article : ViewModelBase, IRenderableViewModel | |
{ | |
[TextField] | |
public string Heading { get; set; } | |
[RenderData] | |
public IRenderData RenderData { get; set; } | |
} |