View FAQListing.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
@using FAQ | |
@inherits UmbracoTemplatePage | |
@{ | |
Layout = null; | |
} | |
<h1>@Model.Content.Name</h1> | |
<h2>Render All FAQ Items</h2> |
View Editors\Base.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 GridControl | |
@using Grid.Web | |
@using Skybrud.Umbraco.GridData | |
@try | |
{ | |
<text>@Html.Partial(Model.EditorView(), Model)</text> | |
} | |
catch (Exception ex) { | |
<pre>@ex.ToString()</pre> |
View TextPage.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
@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> |
View Pagination.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
@{ | |
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) |
View EventsLogic.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
namespace Client.Web.Models | |
{ | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using Buzz.Hybrid; | |
using Buzz.Hybrid.Models; |
View MediaSave.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
@using Umbraco.Core.Models; | |
@{ | |
var mediaService = ApplicationContext.Current.Services.MediaService; | |
SaveMedias(mediaService.GetRootMedia().ToList()); | |
} | |
@functions | |
{ |
View ContactForm.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
using System.Collections.Generic; | |
using System.Linq; | |
using System.Web.Mvc; | |
using Umbraco.Core.Models; | |
using Umbraco.Web; | |
namespace Forms.Web.Models | |
{ | |
public class ContactForm | |
{ |
View ContentExtensions.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
namespace Client.Web | |
{ | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Web; | |
using System.Web.Mvc; | |
using Models; | |
using Newtonsoft.Json; | |
using Umbraco.Core.Models; |
View CacheService.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
public class CacheService : ICacheService | |
{ | |
private readonly MemoryCache _memoryCache = new MemoryCache("Cache.Key"); | |
public void Add<T>(T cacheObject, string key) | |
{ | |
var cacheItemPolicy = new CacheItemPolicy | |
{ | |
AbsoluteExpiration = DateTimeOffset.Now.AddHours(24) | |
}; |
View Helpers.js
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 Helpers = { | |
/** | |
* @function formatMoney | |
* @param {number} n - The number to be formatted | |
* @param {string} d - The character to be used for the decimal. Defaults to ".". | |
* @param {string} t - the character to be used for the thousands separator. Defaults to ",". | |
* @param {int} c - the number of decimal places. Defaults to 2. | |
* @returns {string} | |
* @description Formats a number to a price | |
*/ |
OlderNewer