Skip to content

Instantly share code, notes, and snippets.

Avatar

Luc Gosso LucGosso

View GitHub Profile
@LucGosso
LucGosso / RSSContentProvider.cs
Last active Mar 13, 2017
Content Providers in EPiServer is a way of publishing external data as pages/blocks etc. Here is en example of an RSS Content Provider. Read more: http://devblog.gosso.se/?p=70
View RSSContentProvider.cs
using EPiServer;
using EPiServer.Core;
using EPiServer.DataAbstraction;
using EPiServer.Security;
using EPiServer.Web;
using EPiServer.Web.Routing;
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Configuration;
@LucGosso
LucGosso / ClonedByCategoryContentProvider.cs
Last active Mar 13, 2017
Content Providers in EPiServer is a way of publishing external data as pages/blocks etc... but also a way of publishing content in several places on your web. Due to the lack of publishing in several containers/parents, this is a way of cloning data and keeping friendly urls. Read more http://devblog.gosso.se/2016/09/contentprovider-example-for-…
View ClonedByCategoryContentProvider.cs
using EPiServer;
using EPiServer.Core;
using EPiServer.DataAbstraction;
using EPiServer.Security;
using EPiServer.ServiceLocation;
using EPiServer.Web.Routing;
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Configuration;
@LucGosso
LucGosso / CustomDefaultPlaceHolderProvider.cs
Created Feb 9, 2017
CustomDefaultPlaceHolderProvider for Episerver Forms, build your own Summary in Episerver Forms EmailActor
View CustomDefaultPlaceHolderProvider.cs
using EPiServer.Forms.Core;
using EPiServer.Forms.Core.Internal;
using EPiServer.Forms.Core.Models;
using EPiServer.Forms.Core.Models.Internal;
using EPiServer.ServiceLocation;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
@LucGosso
LucGosso / CustomDefaultPlaceHolderProvider.cs
Last active May 15, 2017
Adding custom placeholders for email in Episerver Forms
View CustomDefaultPlaceHolderProvider.cs
using EPiServer;
using EPiServer.Core;
using EPiServer.Forms.Core.Internal;
using EPiServer.Forms.Core.Models;
using EPiServer.ServiceLocation;
using Gosso.EpiserverSite.Mvc.Models.Pages;
using System.Collections.Generic;
using System.Web;
namespace Gosso.EpiserverSite.Mvc.Business.Forms
@LucGosso
LucGosso / SubscriptionComponentController.cs and Subscription.js
Last active Feb 5, 2018
Episerver Component Gadget for administrating user subscriptions
View SubscriptionComponentController.cs and Subscription.js
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.Mvc;
using System.Web.Profile;
using EPiServer.Personalization;
using EPiServer.Shell.ViewComposition;
namespace Gosso.Episerver.Plugins.Gadget
{
@LucGosso
LucGosso / GoogleAnalyticsService.v3.cs
Last active Jun 18, 2018
Google Analytics Service v3 C# .netframework examples with Episerver
View GoogleAnalyticsService.v3.cs
using EPiServer.Core;
using EPiServer.Framework.Cache;
using EPiServer.ServiceLocation;
using Google.Apis.Analytics.v3;
using Google.Apis.Analytics.v3.Data;
using Google.Apis.Auth.OAuth2;
using Google.Apis.Services;
using System;
using System.Collections.Generic;
using System.Configuration;
@LucGosso
LucGosso / GetPopularItemsFromAnalyticsJob.cs
Last active Jun 30, 2018
Google Analytics Service v4 C# .netframework example with Episerver. Blogpost https://devblog.gosso.se/?p=766
View GetPopularItemsFromAnalyticsJob.cs
using Gosso.Web.Business.Services;
using EPiServer.DataAbstraction;
using EPiServer.PlugIn;
using EPiServer.Scheduler;
using EPiServer.ServiceLocation;
//Episerver Schedual job to update the cache with fresh data from Google Analytics
namespace Gosso.Web.Business.Jobs
{
[ScheduledPlugIn(DisplayName = "Get Statistics from Analytics (api v4)",
View editor_plugin_img.js
"use strict";
var tinymce = tinymce || {};
//Register the plugin
tinymce.PluginManager.add('customimagebuttonplugin', function (editor, url) {
//your custom logic when button clicked
editor.addCommand('tinymcecustombutton', function () {
var isUpdate = false;
//default values
View CustomXhtmlStringEditorDescriptor.cs
using EPiServer.Core;
using EPiServer.Shell.ObjectEditing.EditorDescriptors;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace Gosso.Episerver.Business.EditorDescriptors
{
@LucGosso
LucGosso / ILMPageCheckJob.cs
Last active Nov 21, 2018
ILM: Scheduled job and server to get all pages that is not updated from a past date [https://devblog.gosso.se/?p=953]
View ILMPageCheckJob.cs
using EPiServer;
using EPiServer.Core;
using EPiServer.PlugIn;
using EPiServer.Security;
using EPiServer.ServiceLocation;
using EPiServer.Web;
using EPiServer.Web.Routing;
using Gosso.Mvc.Business.Initialization;
using Gosso.Mvc.Helpers;
using log4net;
You can’t perform that action at this time.