Skip to content

Instantly share code, notes, and snippets.

@gregwiechec
gregwiechec / CompareWithMarkup.cs
Created October 22, 2015 09:20
EPiServer compare with markup
using EPiServer.Core;
using EPiServer.ServiceLocation;
using EPiServer.Shell;
namespace ExtendingCompareVersion.Business.ViewConfiguration
{
[ServiceConfiguration(typeof(EPiServer.Shell.ViewConfiguration))]
public class CompareWithMarkup : ViewConfiguration<IContentData>
{
public CompareWithMarkup()
@gregwiechec
gregwiechec / SoftLinkIndexerTool.aspx
Created October 5, 2015 21:52
EPiServer Admin plugin - Reindex Soft Links
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SoftLinkIndexerTool.aspx.cs" Inherits="ChildrenGridView.Plugins.SoftLinkIndexerTool" %>
<asp:Content ContentPlaceHolderID="MainRegion" runat="server">
<asp:Button runat="server" Text="Run" OnClick="OnClick"/>
<asp:Label ID="lblResult" runat="server" Text=""></asp:Label>
</asp:Content>
@gregwiechec
gregwiechec / commandsInitializer
Created June 1, 2015 09:59
Related contents tool
define([
"dojo",
"dojo/_base/declare",
"epi/_Module",
"epi/dependency",
"epi/routes",
"commands/samples/relatedPagesCommandProvider"
], function(
dojo,
declare,
@gregwiechec
gregwiechec / textarea with statistics - styles
Created May 20, 2016 10:44
textarea with statistics property
.extended-textArea .textArea-wrapper {
display: inline-block;
}
.extended-textArea textarea {
width: 500px;
}
.extended-textArea .statistics {
display: inline-block;
@gregwiechec
gregwiechec / FakeStringFragment.cs
Created June 6, 2016 12:07
Rendering current page in ContentArea
using System.Collections.Generic;
using ContentAreaWithPreview.Models.Pages;
using EPiServer;
using EPiServer.Core;
using EPiServer.Core.Html.StringParsing;
using EPiServer.Security;
using EPiServer.Web;
namespace ContentAreaWithPreview.Plugin
{
@gregwiechec
gregwiechec / ContentAreaEditor.js
Created June 13, 2016 10:42
Adding random items to ContentArea
define([
"dojo/_base/declare",
"dojo/_base/lang",
"dojo/when",
"dojo/on",
"dojo/dom-construct",
"epi/dependency",
"epi-cms/contentediting/editors/ContentAreaEditor"
],
function (
@gregwiechec
gregwiechec / CustomUriContextResolver.cs
Created June 21, 2016 08:23
Deleting single file from trash
using System;
using EPiServer.Cms.Shell.UI.Rest;
using EPiServer.Cms.Shell.UI.Rest.Models;
using EPiServer.Framework;
using EPiServer.Framework.Initialization;
using EPiServer.ServiceLocation;
using EPiServer.Shell.Rest;
namespace ContentAreaWithPreview.Business
{
@gregwiechec
gregwiechec / FavouriteContent.cs
Last active September 16, 2016 19:54
Editor Favourite Content
using EPiServer.Shell.ViewComposition;
namespace FavouriteContentList.Business.FavouriteContent
{
[Component]
public class FavouriteContent : ComponentDefinitionBase
{
public FavouriteContent()
: base("favourites.favouriteContentComponent")
{
@gregwiechec
gregwiechec / CreateContentViewModel.js
Created November 6, 2015 06:35
Show additional properties on content creation
define("epi-cms/contentediting/viewmodel/CreateContentViewModel", [
// dojo
"dojo/_base/array",
"dojo/_base/declare",
"dojo/_base/lang",
"dojo/_base/json",
"dojo/Stateful",
"dojo/string",
"dojo/when",
@gregwiechec
gregwiechec / CheckboxList - Dojo widget
Created July 8, 2015 07:48
Extended CheckboxList property
define([
"dojo/_base/declare",
"dojo/_base/array",
"epi-cms/contentediting/editors/CheckBoxListEditor"
], function (
declare,
array,
_CheckBoxListEditor
) {