ILearnable .Net

May 12, 2009

EPiServer R2: TemplatePage.CurrentPage never null

Filed under: Uncategorized — andreakn @ 14:11

In the good old days (4.5) you could rely on the CurrentPage property to be set if the page you were looking at was in fact a fully populated EPiServer page, or more importantly: You could rely on it *not* being set if the page you were on was *not* a fully populated EPiServer page. Nowadays the CurrentPage property is *always* set, either to a page as ordered or to the start page if nothing else, but with a bool: this.IsDefaultPageLink  set to true if it sorta shouldn’t be there.

I’d have called the bool this.IsNotReallyHere

but what do I know….

Advertisements

2 Comments »

  1. As far as I know, this is how it has always been. But I wont bet on it 🙂

    Comment by Steve Celius — June 2, 2009 @ 20:46 | Reply

    • Hmm. I could have sworn 4.5 behaved that way.. it SHOULD anyway (imho)

      Comment by andreakn — June 3, 2009 @ 13:19 | Reply


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: