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; } | |
} |
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] |
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" /> |
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> |
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) |
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 --> |