Flickr Recent Photos

Tretton underbara år senare kan sara fortfarande ha sin bröllopsklänning ^_^ <3Skål för mig ^_^Liam och Ebba ute i det vackra vädret :-)Min vackra fru i vackra uppsala :-)very old clockEbba i knivstas nya bibblapå väg till jobbet2007-01-20 10-49-42_0001Soluppgången i KnivstaEn vacker morgonPalt palt i stora lass! Sara lyckades magnifikt med sin första palt sats #bArkham horror

Kategorier

Get ContentType from files

I love HttpPostedFileBase! Why? Because it gives me the contenttype from files! But what about the files that I have on my disc and I need to get the ContentType? Unfortunely, you’ll either have to have a huge list with all extensions and their contenttypes which is a major pain. There’re some open source [...]

nHibernate not updating child records when using Merge()

I had to run an update on some posts before I would do an insert. Then when I was about to do my insert, I got the error that the object was already in use.

SaveOrUpdate gave me that error, and ofc Update too. Merge worked BUT it only saved the parent object and [...]

Blank page after login on a Wordpress page, wp-login.php

So I kinda screwed up and changed my database password and totally forgot about my page. This caused the page to be down for a few days without me noticing it until a kind soul told me it was down. (Yes… I’m a bad blogger and I only blog when I feel like it). [...]

Making Polls with Xforms in a usercontrol

XForm is a somewhat of a lazy way out. You know you should do the forms yourself but XForm is simple for the editors and also saves you a lot of job. Anyway, if you want to use XForm to make a poll, you’ll need to make a few adjustments.

First: Create your new [...]

FindPagesWithCriteria with PropertyCriteria and PropertyDataType.Boolean set to false

Huge title but pretty much what this post is about.

To optimize your FindPagesWithCriteria, it’s good to be as specific as you can. i.e not use one criteria, get 500 hits back and then just use the top 5 out of those. Anyway, when using a PropertyDataType.Boolean and you want to get back [...]

How to modify and publish a page programmatically in EPiServer

When you want to alter a page programmatically you need to use EPiServers CreateWriteableClone on the working page. This is because the Page itself is readonly. Now, there’s plenty of info out there how to do this, but just to refresh your mind, here’s some code:

PageData clone = pd.CreateWritableClone(); clone.Property["MyProperty"] = "New value"; [...]

Using FindPagesWithCriteria with CustomProperties

FindPagesWithCriteria is a very handy way to pick up pages that are spread out around your site but there’s a tiny thing that is good to remember when using FindPagesWithCriteria to find pages based on a CustomProperites that you’ve made. Never ever forget to click ”searchable property”  when you add the customproperty to your [...]

How to prevent EPiServer to inherit categories to childrenpages

One of the pages I’ve been working on uses EPiServers categories a lot. But the annoying part with EPiServers categories is the way they inherit down to all children, which leads to the problem that categories can be deleted without someone meaning too. e.g you create a page called ”Books” and you have a [...]

HTML5 fix for Internet Explorer And Doctype fix for EPiServer solutions

HTML 5 introduces new elements to use such as <header> <section> <nav> and many more. The problem is that no version of Internet Explorer recognizes the new elements, but Firefox, chrome and many others does. The solution is easy but a bit boring when you think about it, since it’s about replacing all new [...]

Sidan är inte tillgänglig för aktuellt språk / This page is not available for the active language – EPiServer5 Upgrade to SP2

After upgrading EPiServer CMS5 r2 to CMS5 r2sp2 you might get a nice little error in edit mode. This page is not available for the active language. This is due globalization changes and the workaround is to activate a language for your site. To do this do the following:

1. Go to admin mode [...]