Test your Fast Queries with Sitecore.FakeDb

During the last few months I was very busy with my Master Thesis. Now the project is almost finish and I can spend more time on my blog and helping in the community. Yay! While implementing my project for the Master Thesis I’ve learned a lot about Unit Testing with Sitecore and I realised how easy and fast you can write them. This blog post should show you in a very simple example how you can test your Sitecore Fast Queries. When you decide not to use the Sitecore…

Keep reading

Create simple Unit Tests for the Sitecore Content Search

I recently wanted to test a class where I used the Sitecore Content Search. As I didn’t found a simple example on Google I started to write this blog post. I want to show you in a very simple example how you can create a Unit Test for testing your Content Search queries. Let’s assume that I have a products data template, with a checkbox field Free (to mark that this is for free) and an Item Bucket where I store all the products. I want to retrieve…

Keep reading

Hide fields in the Sitecore Content Editor

By default, the fields you add in your data templates are visible in the Content Editor. Usually this makes sense. But sometimes you add some fields you need to store some hidden information the author should not see or change. All default fields from Sitecore are hidden (i.e. information about statistics etc.). You, as an administrator, can show this fields by enabling the checkbox "Standard fields" in the "View" Ribbon. Adding fields which are only visible when this checkbox is enabled is very easy. There…

Keep reading

Sitecore User Group Switzerland – Round Two

Last year we have started with a Sitecore User Group in Switzerland. We had a great evening, listened to three presentations and talked a lot about our daily tech life with Sitecore. Now, the Sitecore User Group goes into the second round. The event The second event will take place on Monday, 27.04.2015 at the Downstairs Bar in Olten. It starts at 17:30, the first presentation will be about 18:00. More information including time schedule can be found on the event website. Basically the event will…

Keep reading

Be careful with Sitecore pipeline processors lifecycle

In a current project we have the requirement to show the same content in different contextes. For example, we want to show the same content item under different url’s with different breadcrumb navigation etc. To achieve this we’ve added a new processor for the httpRequestBegin pipeline where we build our context. In the different views we catch up this context and generate the markup. The context we build was registered with an IoC (inversion of control) container in a "per webrequest" lifecycle (a new instance for…

Keep reading