Skip to content

Instantly share code, notes, and snippets.

@willprice76
Created September 7, 2012 12:02
Show Gist options
  • Save willprice76/3665610 to your computer and use it in GitHub Desktop.
Save willprice76/3665610 to your computer and use it in GitHub Desktop.
Pageless Tridion Content News List View
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<XDocument>" %>
<html>
<head>
<title>News List</title>
<meta name="description" content="All the latest news" />
</head>
<body>
<h1>News List</h1>
<% foreach(var item in Model.Descendants("item")) {%>
<h2><a href="<%=Example.MvcDemo.ViewHelper.GetItemLink(item,"News")%>"><%=item.Element("heading").Value %></a></h2>
<p><%=item.Element("metadata").Element("description") %></p>
<%} %>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment