Latest Event Updates

GenericListProperty is too low EditMode

Posted on

too low GenericListProperty

It takes only 30% of height.

Workaround is too close it and open again – then it would have full height. It stays correct when you are editing many pages and gets reset when make full refresh.


GenericListProperty empty list in View Mode

Posted on

I am using OpenWaves.EPiServer.GenericListProperty.

I had a problem when my list was populated in EditMode but was always empty in ViewMode.
Two solutions:

  1. You add two lines to episerver.config

  2. Remove properties from code, compile, remove from AdminMode, add again and should work.

I prefer the first one.

Resharper 8 find your view in MVC

Posted on Updated on

Resharper 8 has some new stuff:

  • You don’t have to enter Ctrl+Shift+N to get search for all files. Ctrl+N is enough. No distinction like in R#7
  • You don’t need to write camels: ArtP to search for ArticlePage, now you just write ‘anything’ like ‘arpa’ and it feets ArticlePage.
  • Finding your view is much easier. To find you Index.html for corresponding ArticlePage you can write ‘arpa.csh’.
  • anything you type looks as well for directories (path)
    resharper finds by directory tree

The drawback is that you have more things to deal in this small window. However it is not a big deal 🙂

[ReflectionTypeLoadException: Unable to load one or more of the requested types

Posted on

[ReflectionTypeLoadException: Unable to load one or more of the requested types. The following information may be a subset of the Type/LoaderException information present – inspect with debugger for complete view.
Check assemblies [OpenWaves.EPiServer.GenericListProperty, Version=, Culture=neutral, PublicKeyToken=7d0a8c4a744cf5c7] and/or types [OpenWaves.EPiServer.GenericListProperty.FakeContent, (bla bla bla)

Przykładowe rozwiązanie:
W jednym projekcie zależę od bibliotek w wersji x.y.z, a w innym projekcie, tym z którego startuje aplikacja (Web) jest w wersji x.y.y

Start project from Alloy

Posted on Updated on

Next project I would have to start in Epi7 MVC (and will be responsible for this) would just plain Alloy Templates solution. From there start adding new pages/blocks/etc.

I would leave Alloy pages and blocks for same time so the knowledge (common within Epi world, so its good to stick to it) about creating good blocks/pages will be spread among team. By this I mean naming, organizing in directories, reusing the exact same classes.

Concepts that you have to use, time saver all the time in all contexts (maybe too much said, but it is my current experience):

  • SiteViewEngine
  • SiteImageUrl

Things that can be removed:

  • Content Area renderers – probably its too narrow and detailed

Fallback ustrzegający przed null string

Posted on Updated on

<a href="@Url.PageUrl(Model.Url.ToString())">Link</a>
null object ToString
Press F10 and wait for bum

Poor workaround:

<a href="@Url.PageUrl((Model.Url ?? "").ToString())">Link</a>

The best would be to create Extensions Method PageUrl(Episerver.Url url) taking Url as parameter and performing null check (or fallback).


There is already extension that do this, but strangly in another class:

@Html.UrlLink(Model.Url, "Link")