Friday, February 22, 2013

Geo Point Picker property for EPiServer 7 from Making Waves

Piotr Dela from Making Waves created Geo Point Picker property for EPiServer7

GeoPicker property is based on Google Maps API and provides a rich interface for selecting a geo-coordinates – perfect for editing location of points of interests we want to show on a map.

Installation

Install OpenWaves.EPiServer.GeoProperties NuGet package from http://nuget.org/packages/OpenWaves.EPiServer.GeoProperties/

Getting started
To use the property set the type of the property to GeoPoint.
using OpenWaves.EPiServer.GeoProperties;

...

[UIHint(PropertyGeoPoint.UiHint)]
public virtual GeoPoint CustomLocation { get; set; }

From edit mode

Property editor lets editors type the geo-coordinates in Lat/Long number inputs or click on the location thumbnail to display a richer UI.


The popup lets editors search for locations and/or select a point by dragging a marker over the map.


After the location is selected, property editor shows a thumbnail of the location and its geo-coordinates.

Tuesday, February 19, 2013

OpenWaves.EPiServer.Localization: Strongly typed access to EPiServer language files

Recently Making Waves released OpenWaves.EPiServer.Localization NuGet package. It provides strongly typed access to EPiServer lang. Now you can use:
string text = TranslationKeys.MyPage.MyCategory.Intro.GetString();

// instead of
// string text = LocalizationService.Current.GetString("/myPage/myCategory/intro");

UPDATE: EPiServer 6 & 7 supported

Localization package support both EPiServer 6 & 7. To change version change Resources\TranslationKeys.tt

...
<#@ import namespace="OpenWaves.EPiServer.Localization.Transformations" #>

<# 
    var epiServerVersion = 7;
    // for EPiServer 6.x version    
    // var epiServerVersion = 6;
...

Benefits
  • Intelli Sense support
  • Compile time check for correct language keys
  • When refactoring all occurrences are renamed
  • Supports "Find all usages" of language keys

Usage
  1. Add NuGet package OpenWaves.EPiServer.Localization

  2. It's ready to use!


NOTE: After changing language file (*.xml) you have to"Run Custom Tool" manually to regenerate translation key classes