By Johan Pettersson
14 November 2011 11:03
If you’re listening to DataFactory events like:
protected void Application_Start(object sender, EventArgs e)
{
EPiServer.DataFactory.Instance.CreatingPage
+= new EPiServer.PageEventHandler(CreatingOrSavingPage);
EPiServer.DataFactory.Instance.SavingPage
+= new EPiServer.PageEventHandler(CreatingOrSavingPage);
}
Always check if Page is null in PageEventsArgs. If we're copying a page in edit mode the Page will be null in one of the events!
I've updated the code for my dynamic content fix, check on line 3 in CreatingOrSavingPage.
By Johan Pettersson
13 November 2011 17:43
If you want to mimic the “Mark page as changed”-checkbox in code it's not so obvious how to do that.
Read more...
By Johan Pettersson
11 November 2011 17:51
Give your editors the possibility to select a country from a drop down list.
Read more...
By Johan Pettersson
1 November 2011 16:44
Lately I’ve seen different ways of creating a menu with correct and semantic html in EPiServer. The example in the EPiServer SDK is just soooo wrong from most perspectives. I think this is the best and simplest way:
Read more...
By Johan Pettersson
30 October 2011 13:46
One really big enhancement is canonical urls for your/customers content. I’m sure you all know about the problem with duplicated content, but not everyone tend to fix it. Here’s my take on it.
Read more...