Archives

» Joe

Dynamic Parameters in Jenkins

Posted on by Joe in Continuous Integration, Jenkins | Leave a comment

So I came across a problem recently where I have a Jenkins job that build multiple Nuget package and pushes them to Octopus Deploy. I spent some time looking into versioning and decided I wanted my packages to be versioned using the Microsoft versioning mechanism used by MSBuild with wildcard characters in AssemblyInfo.cs.

Sitecore Webforms for Marketers Send Email with Username and Password

Posted on by Joe in Sitecore | Leave a comment

I always forgot these parameters so writing a quick blog post for easy reference. With WFFM there are parameters you can set on the Send Email Message Save Action for sending an email through an SMTP server with a username and password. The full params are: <Login></Login><Password></Password><Host></Host><Port></Port><IsBodyHtml></IsBodyHtml>

Fix TeamCity failing to clone or pull from Git

Posted on by Joe in TeamCity | Leave a comment

I’ve had a pretty frustrating few hours today where TeamCity appeared to be very slow pulling from Git. I removed the VCS root and added it again, changed from HTTPS to SSH after which point it couldn’t even seem to pull anything from BitBucket. After a bit of searching around I finally found my answer on stack overflow here – http://stackoverflow.com/questions/18766875/teamcity-getting-stuck-at-updating-sources-on-one-git-repo By default TeamCity will only pull files <= 128mb. To change this you need to create an internal property …

Sitecore MVC Tutorial – Controller Renderings

Posted on by Joe in ASP.NET, C#, MVC, Sitecore | 1 Comment

In my previous Sitecore MVC post I showed how to create the menu for my sample website using a View Rendering. Now I’m going to turn that into a Controller Rendering in order to highlight the menu item for the current page.

Sitecore MVC Tutorial – View Renderings

Posted on by Joe in ASP.NET, C#, MVC, Sitecore | Leave a comment

This is my second Sitecore MVC post following on from Creating your first Sitecore MVC website. In this post I’ll extend what was built in that post to create a dynamic menu using a View Rendering.

Sitecore MVC Tutorial – Creating your first Sitecore MVC website

Posted on by Joe in ASP.NET, C#, MVC, Sitecore | 1 Comment

In my last post I wrote about setting up your Sitecore solution. I’m now going to extend that to creating your first Sitecore MVC website. This post will build upon the solution created in my other post using TDS and code generation. I’ll keep this post just to the basics of getting the site up an running and then will write further posts to cover the different areas of Sitecore MVC.

How to set up a Sitecore solution with TDS and Glass Mapper including automatic code generation

Posted on by Joe in ASP.NET, C#, MVC, Sitecore | 3 Comments

In this post I’m going to set up a new Sitecore solution with TDS. I’ll then enable code generation to create glass mapper compatible objects.

How to write to the Sitecore log

Posted on by Joe in ASP.NET, C#, Sitecore | 2 Comments

Sitecore uses log4net for logging. If you want to write to the log in your own code just use the following.

How to set and read parameters on a static sublayout in Sitecore

Posted on by Joe in ASP.NET, C#, Sitecore | Leave a comment

In Sitecore there are two types of binding, static and dynamic. Static is when you use the Sublayout web control directly in your layout and specific the sublayout you want to use. Dynamic binding is when you use a Placeholder web control and set the sublayout that will appear in that placeholder in Sitecore via the placeholder key. When using dynamic binding you can give your sublayout a Parameters Template and set parameters in Sitecore, but how do you set …

Twitter Bootstrap navigation with automatic active class for current page usng ASP.NET MVC

Posted on by Joe in ASP.NET, C#, MVC | 1 Comment

I’ve been playing around some more with Twitter Bootstrap and MVC and wanted to create a top level menu where the active class was added automatically to the item corresponding to the current page. Initially I had an action link inside the list item tag, but as the active class needs to be added to the list item so I decided to create an extension method to generate the entire item for me.