Displaying repetitive content on a single page in Umbraco

Following is the structure of the content folder
-Homepage
    -Articles
        -One
        -Two
        -Three


@inherits Umbraco.Web.Mvc.UmbracoTemplatePage

@* Ensure that the Current Page has children, where the property umbracoNaviHide is not True *@
@if (CurrentPage.Children.Where("Visible").Any())
{
    <div>
        @* For each child page under the root node, where the property umbracoNaviHide is not True *@
        @foreach (var item in Model.Content.Children)
        {
            foreach (var item1 in item.Properties)
            {
				if(item1.PropertyTypeAlias=="summary")
				{
					<h1>@item1.Value</h1>	
				}
				if(item1.PropertyTypeAlias=="details")
				{
					<span>@item1.Value</span>	
				}
            }
        }
    </div>
}
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s