Skip to content

Instantly share code, notes, and snippets.

View hombreDelPez's full-sized avatar

Manuel Fischer hombreDelPez

  • Zurich
View GitHub Profile
@hombreDelPez
hombreDelPez / OrphanedRenderings.ps1
Last active August 10, 2016 17:03
Sitecore PowerShell script to list all orphaned renderings
<#
.SYNOPSIS
Lists the components (renderings) which are not or no longer linked to a page.
.NOTES
Ramon Bruelisauer (original code frame)
Manuel Fischer (adjustements und changes for using it with renderings)
#>
<##
@hombreDelPez
hombreDelPez / OrphanedAssets.ps1
Last active August 10, 2016 17:03
Sitecore PowerShell script to list all orphaned assets
<#
.SYNOPSIS
Lists all media items that are not linked to other items.
.NOTES
Manuel Fischer
#>
function HasReference {
param(
@hombreDelPez
hombreDelPez / EnforceVersionPresEx1.cs
Created December 9, 2016 09:54
Enforce Version Presence Example 1
var language = Sitecore.Context.Language; //DE ist hier Kontextsprache
var item = Sitecore.Context.Database.GetItem("<id>", language);
@hombreDelPez
hombreDelPez / EnforceVersionPresEx2.cs
Created December 9, 2016 10:00
Enforce Version Presence Example 2
var language = Sitecore.Context.Language; //DE ist hier Kontextsprache
var item = Sitecore.Context.Database.GetItem("<id>", language);
var childItems = item.Children;
@hombreDelPez
hombreDelPez / EnforceVersionPresEx3.cs
Created December 9, 2016 10:01
Enforce Version Presence Example 3
using (new EnforceVersionPresenceDisabler())
{
//Dein Code
}
@hombreDelPez
hombreDelPez / NitroNet.Sitecore-Global.asax.cs
Last active June 8, 2017 12:45
NitroNet.Sitecore installation - Global.asax.cs
using System.Web.Mvc;
using System.Web.Optimization;
using System.Web.Routing;
using NitroNet.Sitecore;;
namespace NitroNetMVC
{
public class MvcApplication : System.Web.HttpApplication
{
protected void Application_Start()
@hombreDelPez
hombreDelPez / NitroNet-UnityConfig.cs
Created June 8, 2017 14:07
NitroNet installation - UnityConfig.cs
using System;
using Microsoft.Practices.Unity;
using System.Web.Hosting;
using NitroNet.ViewEngine.IO;
using NitroNet.UnityModules;
using System.Configuration;
namespace NitroNetMVC.App_Start
{
/// <summary>
@hombreDelPez
hombreDelPez / NitroNet.Sitecore-UnityConfig.cs
Created June 8, 2017 14:29
NitroNet.Sitecore installation - UnityConfig.cs
using System;
using Microsoft.Practices.Unity;
using System.Web.Hosting;
using NitroNet.ViewEngine.IO;
using System.Configuration;
using NitroNet.UnityModules;
using NitroNet.Sitecore.UnityModules;
namespace NitroNetSitecoreMVC.App_Start
{
@hombreDelPez
hombreDelPez / NitroNet-Global.asax.cs
Last active June 30, 2017 14:41
NitroNet installation - Global.asax.cs
using System.Web.Mvc;
using System.Web.Optimization;
using System.Web.Routing;
using NitroNet.Mvc;
namespace NitroNetMVC
{
public class MvcApplication : System.Web.HttpApplication
{
protected void Application_Start()
@hombreDelPez
hombreDelPez / nitronet-config.json
Created July 13, 2017 10:30
NitroNet Example Configuration
{
"viewPaths": [
"frontend/views"
],
"partialPaths": [
"frontend/views/_partials"
],
"componentPaths": [
"frontend/components/atoms",
"frontend/components/molecules",