eg. what to modify in web.config
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
@{ | |
@* Pagination Logic *@ | |
var postsPerPage = 5; | |
var allPosts = Model.Content.GetPropertyValue<string>("images").Split(','); | |
allPosts.ToList().ForEach(i => i = Umbraco.TypedMedia(i)); | |
var totalPages = Math.Ceiling((double)(allPosts.Count() / (double)postsPerPage)); | |
var currentPageNo = int.Parse(Request.QueryString["p"] ?? "1"); |
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
<!DOCTYPE> | |
<html> | |
<head> | |
<title>Service Moved</title> | |
<style> | |
body { | |
font-family: "Lucida Console", Monaco, monospace; | |
} | |
</style> | |
</head> |
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
// React componey using the strategy pattern instead of switch | |
import React from 'react' | |
const Registration extends React.Component { | |
constructor(props) { | |
super(props) | |
} | |
render() { |
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 Autofac; | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Web; | |
using System.Web.Optimization; | |
using Umbraco.Core; | |
using Umbraco.Core.Services; | |
namespace MyApplication |
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.Web; | |
using Umbraco.Core; | |
using Umbraco.Core.Models; | |
using Umbraco.Core.Services; | |
namespace MyApp.Services | |
{ |
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 Autofac; | |
using Autofac.Integration.Mvc; | |
using Autofac.Integration.WebApi; | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Web; | |
using System.Web.Optimization; | |
using MyApp.Services; | |
using MyApp.Services.Interfaces; |
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
expect({ | |
name: 'Tiger', | |
species: 'Felis Catus', | |
favouriteSnack: 'Tuna', | |
schedule: { | |
breakfast: '08:00', | |
naptime: '10:00', | |
dinner: '12:00', | |
tea: '18:00' | |
} |
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
// Helper method enumerates over and returns lines in a file | |
static IEnumerable<string> ReadFrom(string file) | |
{ | |
string line; | |
using(var reader = System.IO.File.OpenText(file)) | |
{ | |
while((line = reader.ReadLine()) != null) | |
{ | |
yield return line; | |
} |
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
<?xml version="1.0" encoding="utf-8"?> | |
<!-- For more information on using web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 --> | |
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform"> | |
<appSettings> | |
<add key="umbracoConfigurationStatus" value="" xdt:Transform="SetAttributes" xdt:Locator="Match(key)"/> | |
</appSettings> | |
</configuration> |
OlderNewer