Skip to content

Instantly share code, notes, and snippets.

@gregwiechec
gregwiechec / ExtendedChangeManager.cs
Last active December 12, 2023 22:55
Copying inline blocks when translating pages
using System.Collections.Generic;
using EPiServer;
using EPiServer.Cms.Shell.UI.Rest;
using EPiServer.Cms.Shell.Workspace.Committers;
using EPiServer.Core;
using EPiServer.Data.Entity;
using EPiServer.DataAccess;
using EPiServer.Framework;
using EPiServer.Framework.Initialization;
using EPiServer.Security;
@gregwiechec
gregwiechec / DateEditor.js
Created December 7, 2023 13:44
Date property
define([
"dojo/_base/declare",
"epi/shell/widget/DateTimeSelector",
"epi/shell/widget/DateTimeSelectorDropDown"
], function(
declare,
DateTimeSelector,
DateTimeSelectorDropDown
) {
function dateToString(date) {
@gregwiechec
gregwiechec / ExtendedSelectItem.cs
Created June 6, 2023 20:59
Extended SelectionFactory
public class ExtendedSelectItem: SelectItem
{
public string Class { get; set; }
public string IconClass { get; set; }
}
@gregwiechec
gregwiechec / initializer.js
Last active April 20, 2023 20:18
ContentArea default display options
define([
"dojo",
"dojo/_base/declare",
"dojo/aspect",
"dojo/when",
"epi/_Module",
"epi-cms/contentediting/editors/ContentAreaEditor",
"epi-cms/contentediting/editors/_ContentAreaTreeModel"
@gregwiechec
gregwiechec / ColorEditor.js
Created March 2, 2023 21:41
EPiserver ColorPicker property
define([
"dojo/_base/declare",
"dijit/_CssStateMixin",
"dijit/_Widget",
"dijit/_TemplatedMixin",
"dijit/_WidgetsInTemplateMixin",
"epi/shell/widget/_ValueRequiredMixin"
],
@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 / 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 / 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 / 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 / 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")
{