London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!
London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!
This document describes how to create views. A view is composed of a view definition that defines the basic structure and components that plug-in to areas. The view and component definitions are pretty light weight on the server. They only define basic behavior and a client side widget responsible for creating the user interface.
The parts used when assembling a view:
You can find example implementations of the following:
When a view is loaded the following flow is triggered:
There are several ways that you can alter the content of a view. The first, and most obvious, is of course to plug in a component into a container. The component definition describes an array of strings with the plug-in paths, or areas, that the component can plug in to automatically. If any of these paths matches the PlugInPath property of a panel, then the component will be created and added to the container.
Once all the components have been added to the containers a chain of view transformers are applied to the view. The purpose of a view transformer is to alter a view before it is rendered by, for example, adding or removing components. EPiServer provides a few default view transformers, but it is also possible to add your own.
The default view transformers are:
This example shows how the view is assembled on the server. In this example we will show a view that has four pluggable areas.
Components that want to plug in to areas automatically are added to one or several of their respective areas.
Configuration adds and removes components for the different panels. This configuration is done per view but it is also possible to configure that a specific component should replace another component globally through the IOC container.
If the view contains personalizable panels and the user has personalized these the contents for the panel will be replaced with the personalized content.
Last updated: Feb 23, 2015