Skip to content

Instantly share code, notes, and snippets.

@gregwiechec
gregwiechec / ExtendedCollectionEditor.js
Created December 22, 2015 20:10
PropertyList with image
define([
"dojo/_base/array",
"dojo/_base/declare",
"dojo/_base/lang",
"epi-cms/contentediting/editors/CollectionEditor",
"alloy/editors/extendedFormatters"
],
function (
array,
declare,
@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 / 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 / ArticleWithSlider.cs
Created September 29, 2015 16:25
Content references list with preview
[SiteContentType(GUID = "263B8330-791D-4A5E-BAE4-E7B59F93D3FB")]
public class ArticleWithSlider: ArticlePage
{
[UIHint(MultipleReferencesEditorWithPreviewDescriptor.UiHint)]
[Display(GroupName = SystemTabNames.Content, Name = "Carousel", Order = 100)]
public virtual IList<ContentReference> ContentReferencesCollection { get; set; }
}
@gregwiechec
gregwiechec / NoPreviewContentAreaEditorDescriptor.cs
Created September 18, 2015 18:37
Allow to disable preview options on specific ContentAreas
[EditorDescriptorRegistration(TargetType = typeof(ContentArea), UIHint = UIHint)]
public class NoPreviewContentAreaEditorDescriptor : EditorDescriptor
{
public const string UIHint = "NoPreviewContentArea";
public NoPreviewContentAreaEditorDescriptor()
{
this.ClientEditingClass = "alloy.editors.contentAreaWithNoOptions";
}
@gregwiechec
gregwiechec / SearchMonitor.aspx
Created August 18, 2015 14:57
Search Monitoring tool
<%@ Page Language="c#" Codebehind="SearchMonitor.aspx.cs" AutoEventWireup="False" Inherits="EpiServerThumbnail.Views.plugins.SearchMonitor" Title="IndexingService Health Monitor" %>
<asp:Content ContentPlaceHolderID="HeaderContentRegion" runat="server">
<style type="text/css">
.epi-contentContainer {
width: 900px;
}
.epi-contentContainer h2 {
@gregwiechec
gregwiechec / eventsLogger.js
Last active August 29, 2015 14:27
Subscribing to EPiServer system topics
define([
"dojo",
"dojo/_base/declare",
"epi/_Module",
"dojo/topic"
], function(
dojo,
declare,
_Module,
topic
@gregwiechec
gregwiechec / ExtendedContentReferenceSelctorAttribute.cs
Last active August 29, 2015 14:26
Content Selector with page preview
public class ExtendedContentReferenceSelctorAttribute : Attribute, IMetadataAware
{
public void OnMetadataCreated(ModelMetadata metadata)
{
((ExtendedMetadata)metadata).ClientEditingClass = "alloy.editors.extendedContentSelector";
}
}
@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
) {