Skip to content

Instantly share code, notes, and snippets.

View glcheetham's full-sized avatar

Gary Lewis Cheetham glcheetham

View GitHub Profile
@glcheetham
glcheetham / dont-panic.html
Created April 29, 2016 19:55
A witty random-gif "service unavailable" placeholder
<!DOCTYPE>
<html>
<head>
<title>Service Moved</title>
<style>
body {
font-family: "Lucida Console", Monaco, monospace;
}
</style>
</head>
@glcheetham
glcheetham / package-umbraco-for-deployment.md
Created April 5, 2016 12:16
How to package an Umbraco site for deployment

How to package an Umbraco site for deployment

Files to include in the package

Steps to take after installing the package

eg. what to modify in web.config

@glcheetham
glcheetham / gist:dfe7e29c841dc1e53942
Last active March 1, 2016 15:32
Umbraco Image Pagination Concept Explain
@{
@* 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");