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.Web.Templates; | |
@using System.Text.RegularExpressions; | |
@using HtmlAgilityPack; | |
@model dynamic | |
<div class="cmscontent"> | |
@Html.Raw(TemplateUtilities.ParseInternalLinks(ParseMacros(Model.value.ToString()))) | |
</div> | |
@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.Xml.Linq; | |
@using umbraco.cms.businesslogic.web; | |
@using System.Web.Configuration; | |
@using System.Text; | |
@inherits Umbraco.Web.Macros.PartialViewMacroPage | |
@{ | |
List<string> contentTypes = new List<string>() { "Article" }; | |
// Current site root |
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 Pagination | |
@RenderPagination(model) | |
@helper RenderPagination(Pagination model) | |
{ | |
<nav> | |
<ul class="pagination"> | |
<li class="@(model.Page <= 1 ? "disabled" : string.Empty)"> | |
<a href="@(model.Page > 1 ? "?p=" + (model.Page-1) : "#" )" aria-label="Previous"> |
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 Umbraco.Web.Mvc.UmbracoTemplatePage | |
@{ | |
Layout = "Master.cshtml"; | |
} | |
@{ | |
int currentPage = 1; | |
int.TryParse(Request.QueryString["p"] + "", out currentPage); | |
var model = new Pagination() | |
{ |
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 ContactFormModel | |
{ | |
[DictionaryDisplayName(nameof(CategoryId))] | |
[DictionaryRequired] | |
public int CategoryId { get; set; } | |
[DictionaryDisplayName(nameof(Subject))] | |
[DictionaryRequired] | |
[DictionaryMinLength(8)] | |
public string Subject { get; set; } |
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; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Text.RegularExpressions; | |
using System.Web; | |
namespace Umbraco.Web | |
{ | |
public static class UmbracoExtensions |
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
/// <binding ProjectOpened='watch' /> | |
module.exports = function (grunt) { | |
'use strict'; | |
// Project configuration. | |
grunt.initConfig({ | |
pkg: grunt.file.readJSON('package.json'), | |
less: { | |
dist: { | |
options: { |
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; | |
using System.IO; | |
using System.Security.Cryptography; | |
using System.Text; | |
namespace YourProject.Security | |
{ | |
public static class Cryptography<E> | |
where E : Encoding, new() | |
{ |
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 Project.Web { | |
public class StringExtensions { | |
/// <summary> | |
/// Convert the string to Pascal case. | |
/// </summary> | |
/// <param name="strValue"></param> | |
/// <returns></returns> | |
public static string ToPascalCase(this string strValue) | |
{ | |
// If there are 0 or 1 characters, just return the string. |
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.Linq; | |
using System.Text; | |
using System.Text.RegularExpressions; | |
namespace System.Web.Mvc | |
{ | |
public static class HtmlHelperExtensions | |
{ | |
#region HtmlHelper Extensions | |
public static string Email(this HtmlHelper helper, string email, string message = "JavaScript is disabled, please enable to read this email address") |
OlderNewer