All posts for "MVC"

Integrating EPiServer 7 MVC and Commerce 1 R3 - Part 3: Creating an Entry Action Filter

on July 28, 2013 in Episerver, Episerver CMS, Episerver Commerce, Optimizely, MVC, Development with

When developing out our EPiServer 7 MVC and Commerce site, we needed to have some way to ensure that the requested Entry is valid and exists in our catalog. In our solution, since we have multiple actions in our ProductDetailPageController, we created an action filter to validate {entry} parameter in our route, instead of repeating the code for every action.

This is part of a multi-post series regarding integrating EPiServer Commerce 1 R3 with an EPiServer 7 MVC site. In this post, I'll discuss the action filter we created to validate the requested Entry.

More ››

Integrating EPiServer 7 MVC and Commerce 1 R3 - Part 2: Routing to the Product Detail Page

on July 27, 2013 in Episerver, Episerver CMS, Episerver Commerce, Optimizely, MVC, Development with

Routing to the Product Detail Page is one of the most important components of our EPiServer 7 MVC and Commerce integration. The routing we create will define the primary path to the product's information. Since we are not going to be creating page instances for each product, we need to have some way to determine which Entry should be displayed.

This is part of a multi-post series regarding integrating EPiServer Commerce 1 R3 with an EPiServer 7 MVC site. In this post, I'll discuss the different routing methods to the Product Detail Page.

More ››

Integrating EPiServer 7 MVC and Commerce 1 R3 - Part 1: Developing the Basics

on July 26, 2013 in Episerver, Episerver CMS, Episerver Commerce, Optimizely, MVC, Development with

Over the last couple of months, we've been working on integrating EPiServer Commerce 1 R3 with an EPiServer 7 MVC site. Unfortunately, this is not the most straightforward process, as Commerce 1 R3 is not fully supported with EPiServer 7 sites using MVC. After a lot of trial and error, we've developed a workable solution to getting both to play nicely with each other.

This is part of a multi-post series. In this post, I'll briefly discuss setting up the solution, then cover the basic components needed for our EPiServer 7 MVC and Commerce 1 R3 site.

More ››

Creating a Link to a Page in your EPiServer 7 MVC View

on April 28, 2013 in Episerver, Episerver CMS, Optimizely, MVC, Development with

When developing an EPiServer 7 site (or really any site, for that matter), making a link to a page is one of the most common things you'll do. So, I thought I'd do something a little more basic and explore how to handle this task in your front-end page and block templates, specifically using MVC Razor views. In this post, we'll look at what you can currently use to create a link to a page, then I'll introduce some extension methods that you can use to give yourself a little more flexibility in your MVC view.

More ››

Creating a XForm Block in EPiServer 7 MVC with Working Validation (Updated)

on April 11, 2013 in Episerver, Episerver CMS, MVC, XForms, Development with

I initially posted this solution on the Nansen blog, but since then the code has been updated for both bug fixes and to reduce unnecessary layers (at least, unnecessary for my situation).

With the flexibility that block types offer in EPiServer 7, it would make sense that one common feature that people would want is an XForm in a block, so editors can freely add, move, and reuse blocks with forms around their website. In a recent project, this was one of my requirements.

More ››

Turn Your EPiServer 7 MVC Page/Block Model into a View Model using the Ignore Attribute

on April 11, 2013 in Episerver, Episerver CMS, Optimizely, MVC, Development with

If you've ever built a large MVC application, you'll know that your project can sometimes contain a large amount of files, some of which act as a layer of code between two aspects of the application. One such file is the view model, which is used to transfer data from the controller to the view.

When developing with EPiServer 7 MVC, in most situations you can use the page or block model directly in your view. There are some cases, however, where you'll find yourself using a separate view model to satisfy the needs of the view.

More ››

Working with Localization and Language Branches in EPiServer 7 MVC

on April 11, 2013 in Episerver, Episerver CMS, Optimizely, MVC, Localization, Development with

One powerful feature that EPiServer 7 provides is the localization of page content and the creation of language branches for your site, which allows you to create a multi-language, international site without the need for a huge amount of work. In this post, we'll look at how to configure, utilize, and develop for localization in EPiServer 7.

More ››