Jeremy Davis
Jeremy Davis
Sitecore, C# and web development
Page printed from: https://blog.jermdavis.dev/page/34

A blog about technology that catches my attention (Page 34)

It's a bit like a swap-file for my brain...

10 years, 335 posts and counting

Bonus chatter: My favourite proposed feature for C# v6

Having been away on holiday recently, I've been doing a bit of catching up on the backlog of RSS-based reading that a week out of the office has generated. And one item stuck out at me as particularly interesting: some of the new features being discussed for the v6 release of the C# compiler. I came across a couple of articles discussing presentations given by Mads Torgersen (the C# Programme Manager) at the end of last year discussing some interesting feature proposals

C# ~1 min. read

Next step: Relative data sources...

Having spent a bit of time thinking about relative Data Source Locations last week, it struck me that the logical extension of this is to allow the data sources of components themselves to be relative to the context item. This is particularly useful when you need a branch template, that will include some child items of a page and you want to pre-configure the page's presentation to display these children via the data sources of UI components.

And happily this is a pretty trivial change for Sublayouts.

Improving your Sitecore IA with relative DataSource Locations

As someone famous** once said, with great power comes great responsibility – and the power of Sitecore's component-based page model puts a lot of responsibility on us developers to create a structure for component data sources that makes sense to content editors. The two most common patterns I find myself using are that of having a "shared content" folder somewhere in the content tree which reusable DataSource items live in, and having items as children of the component's page. When using the "shared content" folder you can easily set the DataSource Location field for your UI component to point to location where all the relevant data gets filed, but you can't easily do that if you want to have your DataSource items as children of the page. So you tend to end up leaving the DataSource Location field blank to allow the user to pick the current page as the place to create the new item.

Confirming Sitecore Commands

Be honest people: how many of you have wasted a few hours of your life by accidentally clicking "Revert Database" when you meant to click "Update Database" after a long evening at the development coal face? I certainly have. And if you're like me and tend to serialise only the things you've changed in your project, then that means you generally end up with a dead instance of Sitecore.

C# Sitecore UI ~3 min. read

Bootstrapping...

This blog is a challenge to myself to try and write something technical once a week for a year.

General ~½ min. read