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
@{ | |
var pageSize = 8; | |
if(Model.Content.HasValue("numberOfItemsPerPage")){ | |
pageSize = Model.Content.GetPropertyValue<int>("numberOfItemsPerPage");} | |
var page = 1; int.TryParse(Request.QueryString["page"], out page); | |
var items = Umbraco.TypedContent(Model.Content.Id).Children.Where(x => x.DocumentTypeAlias == "exampleAlias" && x.IsVisible()).OrderByDescending(x => x.CreateDate); | |
var totalPages = (int)Math.Ceiling((double)items.Count() / (double)pageSize); | |
if (page > totalPages) |
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
@inherits UmbracoViewPage<TextPageViewModel> | |
@using Client.Web.Models.ViewModels | |
@{ | |
Layout = "OneColumn.cshtml"; | |
} | |
<section id="primary" class="col-s-8 offset-s-2"> | |
@*Model.BodyText*@ | |
<h1>Heading 1</h1> |
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 GridControl | |
@using Grid.Web | |
@using Skybrud.Umbraco.GridData | |
@try | |
{ | |
<text>@Html.Partial(Model.EditorView(), Model)</text> | |
} | |
catch (Exception ex) { | |
<pre>@ex.ToString()</pre> |
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
@using FAQ | |
@inherits UmbracoTemplatePage | |
@{ | |
Layout = null; | |
} | |
<h1>@Model.Content.Name</h1> | |
<h2>Render All FAQ Items</h2> |
NewerOlder