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> |
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
@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
@{ | |
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
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; |
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 | |
{ |
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 | |
{ |
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; |
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) | |
}; |
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