Skip to content

Instantly share code, notes, and snippets.

View sitefinitysteve's full-sized avatar
🏠
Working from home

Steve McNiven-Scott sitefinitysteve

🏠
Working from home
View GitHub Profile
@sitefinitysteve
sitefinitysteve / CollectionExtensions.cs
Last active June 10, 2020 01:45
SitefinitySteve Extension Collection, included in the RandomSiteControls
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace Telerik.Sitefinity
{
public static class CollectionExtensions
{
/// <summary>
@sitefinitysteve
sitefinitysteve / Samples.aspx
Last active December 19, 2015 04:38
Sitefinity Template Layout Helpers. Use these in a RadListView to generate you dynamic layout wrappers around your content.
<!-- Regular Sample -->
<telerik:RadListView ID="dynamicContentListView" ItemPlaceholderID="ItemsContainer" runat="server" EnableEmbeddedSkins="false" EnableEmbeddedBaseStylesheet="false">
<LayoutTemplate>
<div class="sf_cols">
<asp:PlaceHolder ID="ItemsContainer" runat="server" />
</div>
</LayoutTemplate>
<ItemTemplate>
<div class='<%# Util.Out(Container) %>'>
<div class='<%# Util.In(Container) %>'>
@jonathanread
jonathanread / SingleItemNewsTemplate.ascx
Last active December 1, 2021 17:49
Helper class for incrementing the ViewsCount property of News & Blogs in Sitefinity. This allows one increment per article or post per Session. Also disables incrementing during editing, etc.
<%@ Control Language="C#" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<%@ Register TagPrefix="sf" Namespace="Telerik.Sitefinity.Web.UI" Assembly="Telerik.Sitefinity" %>
<%@ Register TagPrefix="sf" Namespace="Telerik.Sitefinity.Web.UI.ContentUI" Assembly="Telerik.Sitefinity" %>
<%@ Register TagPrefix="sf" Namespace="Telerik.Sitefinity.Web.UI.PublicControls.BrowseAndEdit"
Assembly="Telerik.Sitefinity" %>
<%@ Register Assembly="Telerik.Sitefinity.ContentModules" Namespace="Telerik.Sitefinity.Modules.News.Web.UI" TagPrefix="sf" %>
<%@ Register Assembly="Telerik.Sitefinity" Namespace="Telerik.Sitefinity.Web.UI.ContentUI" TagPrefix="sf" %>
<%@ Register Assembly="Telerik.Sitefinity" Namespace="Telerik.Sitefinity.Modules.Comments.Web.UI.Frontend" TagPrefix="comments" %>
@DanDiplo
DanDiplo / JS-LINQ.js
Last active October 31, 2024 12:33
JavaScript equivalents of some common C# LINQ methods. To help me remember!
// JS array equivalents to C# LINQ methods - by Dan B.
// First: This version using older JavaScript notation for universal browser support (scroll down for ES6 version):
// Here's a simple array of "person" objects
var people = [
{ name: "John", age: 20 },
{ name: "Mary", age: 35 },
{ name: "Arthur", age: 78 },
{ name: "Mike", age: 27 },