Umbraco CMS


Accessing UmbracoHelper in HttpHandler request

Working with UmbracoHelper and IPublishedContent in HttpHandler
If you were planning to create sitemap.xml in Umbraco, you most probably were doing it with HttpHandler. This was fine until Umbraco version 6.2.2. If your website was running in lower version, most probably after update your HttpHandler were crashing since UmbracoContext.Current returns null. ... read more

Same page language switching in Umbraco

Land on the same page in different language in Umbraco using Relations
When we build multi-language website, we usually create two root elements which represent different language websites. To switch the language you just need to add a link to other root elements which represent other languages of the website. With this approach, when you switch language you will end up at homepage of the language regardless which page you were viewing. ... read more

Getting cropped image the smart way

The way to get cropped image URL with option to load original image too
I noticed that some of the content managers keep complaining about the quality and size of cropped images. If you lower down quality, file is smaller but in some cases it gets blurry with quirks which comes from compression applied to a file. Let's face it, image cropper is not Photoshop with all options for image optimization ... read more

Fastest way to return JSON result from a controller

Resturn JSON in MVC controller action
Recently I had to develop a form on a page which loads secondary dropdown list items based on selection in a primary dropdown list. Because secondary list items are basically children elements of the one selected in primary I just had to run through all children and just return text-value pair object to JavaScript to populate secondary dropdown list. ... read more


read more

JQuery & JavaScript

read more