Skip to content

Instantly share code, notes, and snippets.

Ryan Durkin RyanDurkin

Block or report user

Report or block RyanDurkin

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
RyanDurkin / UnusedMediaItemsWithPrompt.ps1
Last active Mar 16, 2018
Sitecore PowerShell script to find media items that are not in use with a prompt for the folder location
View UnusedMediaItemsWithPrompt.ps1
Lists all media items that are not linked to other items. Extended from original to allow the user to provide a location to search
Adapted from the script by Michael West
function HasReference {
RyanDurkin / TridionPageProvider.cs
Last active Mar 31, 2016
DXA Preview DD4T 2013 SP1
View TridionPageProvider.cs
public string GetContentByUrl(string Url)
LoggerService.Debug(">>GetContentByUrl({0})", LoggingCategory.Performance, Url);
//Custom DXA Preview code added here
string retVal = string.Empty;
if (
HttpContext.Current.Request.QueryString.Count > 0 &&
HttpContext.Current.Request.QueryString["preview"] != null &&
HttpContext.Current.Request.QueryString["pageUrl"] == Url
RyanDurkin / gist:6578058
Created Sep 16, 2013
ComponentLink Class
View gist:6578058
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Xml.Serialization;
/// <summary>
/// Summary description for ComponentLink
/// </summary>
RyanDurkin / gist:3879176
Created Oct 12, 2012
Restarting Tridion Services Using A Batch File
View gist:3879176
@echo off
net stop "Tridion Cache Channel Service"
net stop "Tridion Content Deployer"
net stop "Tridion Content Manager Publisher"
net stop "Tridion Content Distributor Transport Service"
net stop "Tridion Content Manager Business Connector"
net stop "Tridion Content Manager Search Host"
net stop "Tridion Content Manager Search Indexer"
net stop "Tridion Content Manager Service Host"
View gist:3808111
<Item typeMapping="ComponentPresentation" itemExtension=".Xml" cached="true" storageId="MSSQL_01" />
RyanDurkin / gist:3808105
Created Sep 30, 2012
Get Product Price Method
View gist:3808105
public ProductPrice GetProductPrice(string tcmId)
return GetAllPrices().Where(p => p.TcmId == tcmId).First();
RyanDurkin / gist:3808103
Created Sep 30, 2012
Product Price Utilities Class
View gist:3808103
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
public class ProductPriceUtilities
public static List<ProductPrice> GetAllPrices()
//create a list to return
RyanDurkin / gist:3808100
Created Sep 30, 2012
Product Price Class
View gist:3808100
using System;
using System.Linq;
using System.Xml.Serialization;
using System.IO;
using System.Xml;
[XmlRoot(ElementName = "product_price")]
public class ProductPrice
RyanDurkin / gist:3808097
Created Sep 30, 2012
Product Price XML CT Source Code
View gist:3808097
<xsl:stylesheet version="1.0" xmlns:xsl="" xmlns:tcm="" xmlns:xlink="" xmlns:xsd="" xmlns:tcmi="" xmlns:xhtml="" xmlns:tcmse="" exclude-result-prefixes="productPrice tcm tcmse xsl xlink tcmi xsd xhtml" xmlns:productPrice="uuid:341ebd00-fcf9-46d3-b4db-c8402acf798b">
<xsl:output method="xml" omit-xml-declaration="yes" version="1.0" indent="yes" cdata-section-elements="tcm_id product_tcm_id three_month_rate twelve_month_rate" />
<xsl:template match="tcm:Component">
<xsl:variable name="productPriceContent" select="./tcm:Data/tcm:Content/productPrice:Content" />
<xsl:element name="product_price">
<xsl:element name="tcm_id">
<xsl:value-of select="@ID" />
You can’t perform that action at this time.