Pages

Tuesday, March 24, 2015

List Enum Types and Values in C# - Ektron Sample

Sometimes when you are working with an API you run across a scenario where the documentation doesn't outline exactly what you need, but you know it's there in the code. I have come across this scenario in several cases while working with Enumerations, specifically, where I knew I needed one specific value, maybe two, but I was uncertain exactly which ones they were.

Thankfully, with Visual Studio you can type a part of the Namespace, Class, or Enumeration, and then scroll through the list to see your choices for Enum types or values in Intellisense. Sometimes, though, that's a bit slow for finding exactly what's needed; especially when dealing with a list of over 150 options. This isn't always the case, but in those instances where I have a large list housed in a Namespace, Class, or two, I would prefer an easier method to visualize them, and maybe look through them.

Wednesday, March 18, 2015

Organizing Views in Sitecore

I have recently been working on a Sitecore project that is not terribly complicated, but has the potential to support multiple sites. The sites are similar in structure, and they will share some components, but there are many pieces of them that will be unique enough to warrant their own Views.

And with that magic word you can probably guess that this Sitecore instance is built with MVC. For a little more information about it, this instance of Sitecore is running version 7.5 and MVC 5.1 with Razor syntax.

The Problem

The problem is I want to keep an organized structure for my site not only with my Sitecore architecture, but also for my Controllers and Views. I am dealing with a Sitecore instance that will host multiple sites in the near future, so I have structured Sitecore to have different site-specific folders in my Content, Layouts, Media Library, and Templates sections. There are also Global folders in these sections where I will store items that are universal, but the specifics around my architecture can be saved for another post.