Open Source

Specify Default DisplayOption in the Content Area

Time to time when working on various projects we come across requirement to control somehow which DisplayOption will be selected as default, once content is placed inside particular ContentArea. As most of our projects are running under Twitter Bootstrap system - this is ideal feature request for EPiServer Bootstrap Content Area plugin. As I'm always trying to be developer friendly - I would like to be able to define these default display option rules in the code. And finally version 3.3 got these features. Default DisplayOption for Block So…

Keep reading

Year in Review

This is perfect timing for a busy people like us in IT industry to stop by and look back on the path that has been walked and some good things accomplished. Below is a short summary of things that I hope you will find useful and beneficial in your own way. This is an experience had this year within my lovely industry, company I'm working in and with people around me. Github Move I was using git and GitHub particularly as open source project repository quite a while. Once you…

Keep reading

Row support added to Bootstrap ContentArea

With helpful support from Huilaaja (@huilaaja) Bootstrap aware ContentArea renderer (or in other words - EPiBootstrapArea) got row markup support. Originally row support documentation for ContentArea you can find in author's blog post. With author's permission now row support is added to Bootstrap aware content area renderer package. Enable Row Support For backward compatibility and general idea of Bootstrap content area renderer - row support is disabled by default. You need to enable it explicitly. If you want to enable row markup support "globally" on every content area, you should…

Keep reading

What's new in FeatureSwitch?

It's been while since last FeatureSwitch library release. Just pushed out a bit of stuff held under the hood. Some of them are requested by my lovely consumers :) Here are enlisted some of the latest version features in the library. 1) EPiServer Site Strategy. Now you can use EPiServer's site strategy to enable or disable feature per particular EPiServer site. With example below feature ThisFeatureIsOnlyForSite1 will only be enabled if request is made against site named "Site1", otherwise - feature will be disabled. [EPiServerSite(Key = "Site1")] public class ThisFeatureIsOnlyForSite1 : BaseFeature…

Keep reading

Creating EPiServer Site Menu out of Block Driven Content

For one of our great customers we needed to make site out of just only few pages and lots of blocks. It reminds sort of single page application, just there is no client-side behavior as original SPA projects have. Anyway, in the middle of the project we came to task to make site menu. As we know it's quite easy to build site menu out of the pages and subpages and children pages of these subpages. But this time, we had almost no page structure in CMS, but instead, we…

Keep reading

Asp.Net Mvc Areas - Packed as NuGet

If you would want to add Asp.Net Areas support to your EPiServer site, you would need to copy some files from my previous blog post. Copying files from someone's blog posts seems to be good idea, but it's a bit problematic in case of updates or changes. If so, then we share common vision that by installing NuGet package, your project gets up-to-date support for Asp.Net Mvc Areas. For that reason I packed up Asp.Net Mvc Areas support into NuGet package, for you guys. You may just…

Keep reading

Asp.Net Mvc Areas in EPiServer - Part 2

Asp.Net Mvc Areas is a great way to organize and structure your EPiServer site. Once you have multi-tenant site where the same EPiServer installation with the same set of libraries, styles, script set and other assets is handling more than single site - Asp.Net Mvc Areas become really handy to group particular site's specific assets and other stuff together under single folder. This also gives developers more obvious and more clear picture of the project setup. However we all know that there is no native support for Asp.…

Keep reading

FeatureSwitch meets Glimpse

FeatureSwitch library got yet another plugin in its family. Glimpse is an amazing framework for troubleshooting and tracing your web application, even in production environment. If by coincidence you are a consumer of this framework and also use FeatureSwitch library, then now they run together. You can access your features through Glimpse control panel. Installation You need to install a package from nuget.org feed: > Install-Package FeatureSwitch.Glimpse Using FeatureSwitch.Glimpse package you can get an overview of your features and its state through FeatureSwitch tab. There is also…

Keep reading

EPiServer DDS Strategy for FeatureSwitch

Thanks to Paul Smith for adding some more EPiServer integration for FeatureSwitch library. Now FeatureSwitch EPiServer integration library is equipped with DDS storage strategy. This was pretty easy to implement: public class EPiServerDatabaseStrategyImpl : BaseStrategyImpl { public override bool Read() { var store = typeof(FeatureState).GetStore(); var definition = store.Items<featurestate>().FirstOrDefault(d => d.Name == Context.Key); return definition != null && definition.Enabled; } public override void Write(bool state) { var store = typeof(FeatureState).GetStore(); var definition = store.Items<featurestate>().FirstOrDefault(d => d.Name == Context.Key) ?? new…

Keep reading

Initializable modules without EPiServer

EPiServer initialization modules is a great feature to provide plugin facilities for the hosting application. I find initialization modules pretty handful in cases when you need to initialize some library, configure some stuff or do whatever needed at application start-up. However there are times when you have to develop site without wonderful backup platform that takes all boring boilerplate code away and provides with much awesome stuff and features. Let’s switch to ordinary Asp.Net Mvc application initialization code: [assembly: OwinStartupAttribute(typeof(WebApplication1.Startup))] namespace WebApplication1 { public partial class…

Keep reading

Tiny C# clean-up improves understanding of the code

I’m starting to collect small fragments from everyday life to understand and increase understanding and readability of code I’m coming across. First piece in this category is gone which I came across while contributing to one of the open source modules. Original fragment: { IEnumerable btypes = GetBlockTypes(); List blockproperties = new List(); int x = 0; foreach (BlockType type in btypes) { x = 0; foreach (PropertyDefinition def in type.PropertyDefinitions) { x++; blockproperties.Add(new TypePropertyResultItem { TypeName = x == 1 ? type.Name : “”, PropertyName = def.Name, Description = def.TranslateDescription(), DisplayName = def.TranslateDisplayName() }); } } return blockproperties; } Modified…

Keep reading

ImageResizer.Plugin.EPiServerBlobReader

Overview ImageResizer is one of top choice library when it comes to optimizing media assets in web context. EPiServer 7.5 introduced really cool feature Asset and media. You need to thank and follow Martin Pickering hard work to get both of these worlds working together which involves a bit of hacking here and there. Recently I got sick of repeating these steps from project to project and came up with a package of NuGet. Package gently modifies your web.config file in order to add new plugin to the…

Keep reading

FeatureSwitch library 1.0 – Released!

Have you ever wrote the code like following to verify that either you have to disable or enable some functionality base on set of conditions (usually different sources): if(ConfigurationManager.AppSettings["MyKey"] == "true") { // feature is enabled - do something ...; } else { // feature is disabled - do something ...; } or something like this: if(HttpContext.Current != null && HttpContext.Current.Session != null && HttpContext.Current.Session["MyKey"] == "true") { return ...; } FeatureSwitch library should reduce amount of time and code needed to implement feature toggle in unified way. FeatureSwitch library is easily adoptable…

Keep reading

Overview your EPiServer scheduled jobs interactively

The Case EPiServer scheduled jobs list in larger enterprise scale projects may get huge enough in order not to be able to overview them. Few pain points around scheduled jobs presentation in administrative EPiServer interface: Section for listing scheduled jobs usually presents list of jobs in some unpredictable order. It’s hard to tell details of the job, which of them is enabled, which of them failed last time, what is the schedule interval, etc. It’s also not easy to tell which of the jobs are running at any…

Keep reading