Blog

(Filtering posts by category: Code Bits And Pieces) - Remove filter
A simple way to hide fields in the Umbraco back end

A simple way to hide fields in the Umbraco back end

A (fairly) simple way to get some not-needed-for-now document properties out of your way by hiding them in the back end without the need to delete them.
Read more

Responsive background images in Umbraco with focal point preservation

Responsive background images in Umbraco with focal point preservation

Responsive background images are always an issue since they're only possible via CSS media queries. The very useful SRCSET attribute can't be used with background images. In this article, we attempt to create an automated way to handle such images in Umbraco in order to increase speed and preserve bandwidth in mobile viewports.
Read more

An SQL script to get all dictionary items for all languages in a single table

An SQL script to get all dictionary items for all languages in a single table

Wouldn't you like to have all dictionary items on a single table that you could paste inside a spreadsheet? Even if you wouldn't, your clients probably would.
Read more

Responsive images with srcset and image cropper

Responsive images with srcset and image cropper

In this post you'll learn how to use Image Cropper together with the SRCSET HTML attribute in order to generate mobile-friendly, responsive images for your site. The SRCSET attribute defines a different image for each viewport size and delegates the decision on what image to load to the browser.
Read more

Bulk updating documents with their default templates

Bulk updating documents with their default templates

A simple piece of code to take care of all those lonely, template-less documents which were in place BEFORE you remembered to assign a default template for their document type - yes, it happens when you open your back-end to the client for data entry before starting to develop the front end. And yes, client requests like that do happen.
Read more

Creating dependent MultiNode TreePickers (MNTPs)

Creating dependent MultiNode TreePickers (MNTPs)

In this article we demonstrate how to create two dependent MultiNode TreePickers (MNTPs) - the second one using the first one's selection as its root node - using some pretty XPath.
Read more

Getting the right starting node for MultiNode TreePicker with XPath

Getting the right starting node for MultiNode TreePicker with XPath

Umbraco's MultiNode TreePicker (MNTP) data type has a couple of tokens (or, more precisely, "context-aware placeholders") that can be used in the XPath query defining the starting node for the picker and represent the current or parent node - but these tokens behave differently when creating a new node than when editing an already published node. In this post we will see why and how we can make MTNP behave consistently regardless of whether the node being edited is new or existing.
Read more

IntelliSense for document properties in Visual Studio when not using Models Builder

IntelliSense for document properties in Visual Studio when not using Models Builder

We created a quick-and-dirty solution for when you don't want to (or can't) use the new Umbraco strongly-typed models (Models Builder) but you still need IntelliSense for your property names.
Read more

;