Once In A White Moon - by Gina Therese Hvidsten
© 2024
Once In A White Moon

Movie and TV statistics of a decade

Introduction In 2009 I started keeping track of all the movies and TV-shows I watched. I limited this to only content from my own collection. The last few years I haven’t really been purchasing any more physical content due to streaming getting good and easily accessible, and I’ve barely watched any of the content I own since 2020, so I figure it’s about time I take a look at the statistics of what I’ve actually watched this last decade (and change). Exclusions There are, of course, the obvious list of movies with “Star Wars” coming up on top (not surprisingly with 9 movies, 2 spin-off movies, and a couple of animation shows), with the “Lord of the Rings” trilogy taking the runner up. This is […] Read more

xConnect as publishable project, Part 1 (Models)

I’m sure Sitecore had their reasons for separating out facets and other info into xConnect instead of using MongoDB, and for all intents and purposes this works fairly well. However, as I’m sure you have found out, it takes a bit more configuration to get xConnect to work. When you create a new facet you need to update at least four files, and the documentation isn’t always very clear. What we ended up doing on a project we were working on at the office, and which I have also included in my demo solution on GitHub, was to have a separate application that gathers all the information and creates the necessary files for you. These are copied to another web project in the solution that contains […] Read more

Automatically deploy all Sitecore Helix projects

A colleague wrote this blog post on how to deploy a Sitecore Helix solution without using gulp, which sounded like a good idea. However, me being me, I didn’t much care to open a package manager console and writing commands every time I wanted to publish the entire solution, so I came up with this alternative that (seemingly) integrates more with Visual Studio, and you only have to publish the main site project to also publish all the other projects. Prerequisite The prerequisites for my variant is a bit simpler and it only requires that IIS Management Script and Tools must be enabled from within “Turn Windows features on or off”: Install script Now you can copy the PowerShell script and config file from my GitHub repository and put […] Read more

MVC Attribute Routing in Sitecore 9

Due to Sitecore’s peculiarities, it doesn’t support Attribute Routing out of the box, and using the MapMvcAttributeRoutes()  extension method in MVC is not recommended. Sitecore does support MVC Routing, though, and Sitecore’s documentation on MVC routing gave me something to work with to allow me to use Attribute Routing. As the documentation states, you need to inject a custom pipeline after Sitecore.Pipelines.Loader.EnsureAnonymousUsers. This placement ensures that we can still track logged in users in our attribute routes. Instead of adding each route manually as in the documentation, I use reflection to get all controllers from my assemblies, loop through all the methods in each controller, and check for the existence of MVC Route attributes. If the method has a route attribute I then create a new route using […] Read more