EPiServer

Breaking Change in ImageResizer EPiServer Plugin

Usually I don't post small changes in separate blog post, but I think that it's worth to mention breaking changes in latest ImageResizer (IR) plugin for EPiServer. Before If you are using Fluent API to resize the image, then you may face inconsistency in API. Passing in null or ContentReference.EmptyReference you will get an ArgumentNullException exception: @Html.ResizeImage(null, 100, 100) However, if passing in string.Empty for the another overload - you would get back empty string: @Html.ResizeImage(string.Empty, 100, 100) Why this is bad -…

Keep reading

Updates for DbLocalizationProvider - Foreign Resources

Blog post about latest updates for database localization provider project. Release mainly focuses on foreign affairs - foreign, hidden and referenced resources. Read further for more info. Foreign Resources Good friend and colleague of mine asked once: "How do I register localized resources for ValidationIssue enum from EPiServer Commerce assembly?" Short answer back then was - you can't. Until now. With latest database localization provider now you can tell provider to get familiar with so called foreign resources and include those in sync process as well - even they are…

Keep reading

DbLocalizationProvider step closer to front-end

Along with other smaller bug fixes, database-driven localization provider for EPiServer got closer to front-end. We joined forces together with my old pal and friend Arve Systad and made it possible to add translations to client side resources as well. Setup So setup for the client-side resource localization with help of DbLocalizationProvider plugin is more or less straight forward. You will need to install DbLocalizationProvider.EPiServer.JsResourceHandler package from EPiServer feed and add corresponding <script> include in your markup file to fetch translations from the server: <script…

Keep reading

Small Enhancement for Feature Folders

Great colleague of mine Māris Krivtežs wrote blog post about feature folders describing code organization into folders by features or functional areas rather than technology or different grouping. However, one of cons from Maris' approach we couldn't reconcile with - name of the sub-feature folder needs to follow Mvc controller naming convention. "Another issue is related to the sub-feature folder naming. Sub-feature folder still should be called with the same name as a controller." So I made tiny adjustment to the view engine worth sharing. Adjusted code is below. public…

Keep reading

Localization Provider - Import and Export (Merge)

It's been awhile since last update for DbLocalizationProvider for EPiServer. Anyway things been in my backlog. Period around New Year is not the most productive for me :) This blog post will describe some of the interesting stuff I've been lately busy with. Export & Import - View Diff Once upon a time I got sick of merging and importing new resources from staging environment (with adjusted translations by editors) into production database where on the other hand editors already made changes to existing resources. Up till now import process only…

Keep reading

Scheduled Jobs Updates

Some great updates have been delivered to EPiServer Scheduled Jobs infrastructure within version 10.3. In this blog post we will review some of the important changes. Scanning Process Property IsStoppable is now calculated during scanning process. Scheduled jobs scanner detects whether job is stoppable or not. If so - it's written down to the database and used later when job is being triggered. Also - now with v10.3 you don't need to inherit from base class (EPiServer.Scheduler.ScheduledJobBase). In this case all you need is to have…

Keep reading

Customize Css styles loaded from EPiServer.Forms.Samples

This blog post will describe a way how to customize styles and scripts loaded by EPiServer.Forms.Samples package. Background Unfortunately EPiServer.Forms package does not have DateTime picker available in standard package. So you need to download and reference sample package that contains reference scripts and form elements for some additional stuff. Among others one of them is date time picker. It's based on jQuery UI. More or less everything is OK, until you need to customize look & feel of the date time picker. The way how it's…

Keep reading

Playing with Fire - Part 2, updates for DbLocalizationProvider for EPiServer

Story continues with fire and localization cases inside EPiServer sites. This time smaller update for database localization provider, but still - worth sharing. Support for Custom Attributes Currently database provider supports and understands just a few System.Attribute child classes: [LocalizedModel] - this is main marking attribute for making sure that provider resource sync process will pickup decorated class and scan resources there; [LocalizedResource] - this is similar as LocalizedModel, but makes sure that resources discovered at this class will take localized resource semantics. Read more here about differences; [ResourceKey]…

Keep reading

Playing with Fire - Localized EPiServer View Models

Recently released driven localization provider for EPiServer had main focus on more complex view models along the other smaller bug fixes and features. And specifically - there were few unsupported scenarios for the view models with base/parent class. Here is the list of all new features in v2.1. Extract Abstractions Until now, if I do need to decorate some of the resources that are located in some core area assembly - you need to reference DbLocalizationProvider library that had some undesired dependencies (for instance, why do I need…

Keep reading

ImageResizer Plugin for EPiServer v10

ImageResizer.Net Plugin for EPiServer v10 is released. ImageResizer.Plugins.EPiServerBlobReader got version 5.0.0. "Old" NuGet package for EPiServer 9.x is updated with upper version constraint fix. Now plugin package v4.2 has upper EPiServer version set under v10 exclusive. Note About Image Preview That was quite "interesting" experience to realize changes in EPiServer.Web.BlobHttpHandler. This is eventually the guy who is responsible for returning Blob back to the client. A bit more details below. Background First of all a bit background. Images in EPiServer EditUI…

Keep reading

Configure EPiServer Media Auto Publish on Upload

In this post we will enhance media auto-publish option to gain more control over what's going to be automatically published and what will stay for manual publishing. EPiServer gives site admins option to configure whether media file gets automatically published when uploading to Blob storage. This is very nice, but the problem is - this setting is global. It means either all media files get automatically published, or none - on/off. For one of our customers requirement was to delay publish only certain file extensions (usually .pdf files with…

Keep reading

Apply DisplayOptions for EPiServer.Forms Elements

Apply DisplayOption for EPiServer.Forms Elements Would you like to use this feature also for EPiServer.Forms? In this blog post I'm gonna show you how to do that. Background It's really great to see platform evolving and adding new features. But unfortunately - I must say that EPiServer.Forms are pretty close for modification (which is good) but at the same time - not so open for extensions, that's why we will need to modify some of the built-in templates to get this done. Getting Started First of all,…

Keep reading

EPiServer Twitter Bootstrap Content Area Renderer Updates

Here comes small updates for the Content Area renderer in the latest version: Now EPiServer.Forms are supported Possibility to have your own Css classes DisplayOption is now available in block template as well (if needed) Some smaller bug fixes Naming Challenges As you might know - I'm still struggling with naming of this package. Originally it was planned to be as Twitter Bootstrap Content Area Renderer, but apparently over time package feature set deviated from original idea as now package gives so much more than just adding necessary Css…

Keep reading

EPiServer DbLocalizationProvider - fresh 2.0 is out!

Why? You might ask, but changes I guess is the only constant thing in this industry. DbLocalizationProvider is witnessing new version and some cool features covered in more details below. Also internally provider survived quite huge refactoring activities, while I was redesigning from central services and repositories to more granular command and queries. But that’s the story for another blog post. New Features in 2.0 Here goes the list of new features available in version 2.0. List is not sorted in any order. Translate System.Enum It's…

Keep reading

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

Db Localization Provider - Part 2: Configuration and Extensions

In this blog post we are going through some of the configuration options available for DbLocalizationProvider for EPiServer. You might be wondering what can and should be configurable for localization provider in the context of the EPiServer, but there are few things. Configuration Setup for Libraries Developing libraries as an author you always need to keep in mind your consuming projects and usage scenarios, need to think about how your library will be setup, used and extended if needed. I really liked Mark Seeman's blog posts about developing libraries and…

Keep reading

Db Localization Provider - Part 1: Resources and Models

Resources and Models This is first post about more details inside DbLocalizationProvider for EPiServer. In this post we will go through localization approach for arbitrary resources that can be used from the code to provide some message to the user or anywhere else where localization is required. Another type of localization target is model. By model we can assume any kind of class that is used to render a page, or collect posted back data from the user. Usually models are decorated with various data annotation attributes indicating underlying data…

Keep reading

EPiServer Database Localization Provider - Released!

Background Why on the Earth I would ever want to change my EPiServer localization system? EPiServer provides you with a way to organize localization resources using set of Xml files. Working on multi-lingual projects and seeing how support teams are struggling and bored with changing resource value - thought: there has to be space for improvement.. We don't need localization Lately I've been working more and more with international sites where single language is not the case at all. Localization is not needed - because we have only single language.…

Keep reading

Create Your Library Configuration API for EPiServer

Time comes when you need to extent EPiServer functionality by providing your own library with new or modified functionality. I'm big fan of configuration via code. Which may give you possibility to configure some features with LambdaExpression, e.g. () => true to ensure that you are able to set feature's state on or off during runtime. This opens up quite interesting scenarios that I'm going to cover soon enough in other blog post. Anyway, what I'm looking for is to make sure that my library consumers can do something like…

Keep reading

<head> driven by Content Area

For some powerful sites and editors sometimes it's wise to give them power to manipulate some stuff in <head> area. One of the simplest way to give editors this possibility is to create ContentArea where editors could create particular set of available blocks that would output themselves between <head> elements. By default EPiServer will generate wrapping element around content area (div tag name is actually controllable as well, more info here): @Html.PropertyFor(m => m.PageHeaderArea) Resulting in: <div> <!-- CA wrapper…

Keep reading