Skip to content

Instantly share code, notes, and snippets.

View hombreDelPez's full-sized avatar

Manuel Fischer hombreDelPez

  • Zurich
View GitHub Profile
@hombreDelPez
hombreDelPez / OrphanedDatasources.ps1
Last active May 29, 2018 09:50
Sitecore PowerShell script to list all orphaned datasources
<#
.SYNOPSIS
Lists the datasources which are not or no longer referenced to a rendering in a page.
.NOTES
Ramon Bruelisauer (original)
Manuel Fischer (adjustements for the Master Solution)
#>
<##
@hombreDelPez
hombreDelPez / ActiveReminders.ps1
Created August 10, 2016 16:20
Sitecore PowerShell script to list all active reminders
<#
.SYNOPSIS
Lists the set reminders of all content elements.
.NOTES
Manuel Fischer
#>
function Get-AllItemsWithReminders {
Get-ChildItem -Path $homeFolder -Recurse | IsReminderSet
@hombreDelPez
hombreDelPez / AllShortUrls.ps1
Created August 10, 2016 16:21
Sitecore PowerShell script to list all short urls
<#
.SYNOPSIS
Lists all the short URLs () respectively the set aliases in the system
.NOTES
Manuel Fischer
#>
$database = "master"
@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 / 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 / UnpublishedPages.ps1
Last active December 9, 2019 05:43
Sitecore PowerShell script to list all unpublished pages
<#
.SYNOPSIS
Lists the pages which are not published yet (in the current version or any version at all).
.NOTES
Manuel Fischer
#>
function Get-AllUnpublishedPages {
Get-ChildItem -Path $homeFolder -Recurse | IsPage | IsPublished
@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-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()