Sean Holmesby

.NET and Sitecore Developer

By

Powerful ways you can save on Sitecore development time

Working on Sitecore? How much time are you actually wasting, instead of getting work done?
Maybe you’re a Slack-er.
Maybe you just think, ‘that’s how it is’ and you do things the hard, time-consuming way.
Or maybe you actually want something better…..

Anyone that knows me in the Sitecore community, knows my love for the tooling and processes of Sitecore development. Working at Hedgehog, it’s something we are constantly analyzing from our own projects, and something we are always trying to improve on. We aim to keep development costs down on projects by not cutting features, but by working better. This leads to happier clients, who get more bang for their buck when hiring a Sitecore development team.

So how do we do it?

Well, at Hedgehog, we not only do client work producing websites, but we also dedicate people to work on tools and modules that help improve things. Most of the time, these tools are born out of the frustrations that we’ve found with the paradigm, but also from the general murmurs from the community. Having hands-on experience with the problematic stuff in Sitecore development, we’re in a position to try and find ways to improve it. Sometimes this leads to shared source modules that we create, sometimes it’s examples of projects for people to see, and sometimes, with enough demand, it can result in full-scale, commercial products with 24/7 support and dedicated development teams.

TL;DR

  1. Use all the productivity features of TDS Classic
  2. Use Sitecore’s own tooling
  3. Use what others before you have already created
  4. Don’t wait for Sitecore’s lengthy app pool reload….use ZeroDeploy instead!
    Sitecore is Loading

Read More

By

TDS: The Evolution of Auto-Sync

Team Development for Sitecore (TDS) version 5.5 has now been officially released to the public I’ve had a play with the impressive list of new additions, and loved the further improvements to my Sitecore development efficiency. Features like the new Delta Deploy feature, and the Auto Deployment of Content Files have me doing Sitecore development quicker than ever.

One big new addition available in TDS v5.5 is the AutoSync feature… Another efficiency helper, where Sitecore changes get synced back to the TDS project automatically.
It has been described as a ‘new’ feature…. But is it?

Really, Auto-Sync has existed in TDS for a while, it’s just taken on a new form in v5.5.
Let me explain what I mean by this.

Read More

By

The Launch Sitecore Site using TDS

The Launch Sitecore site is a great shared source site that allows Sitecore editors and developers to check out a complete Page Editor and DMS friendly Sitecore solution. The site comes complete with Engagement Plans, User Profiles and Lucene Indexing, and the code and content can be downloaded by registering on the site, then going to the /download page.
Launch Sitecore

While playing around with the site, I wanted to have a play with a couple of things from the development side of things. I wanted to teach myself things with:-

As a result, I have created a GitHub repository that has the code from the Sitecore package in a Web Application solution, and have converted all of the items in the package into serialised items in TDS.
You can grab the repo from here:-
https://github.com/SaintSkeeta/LaunchSitecoreTDS

Read More

By

Sitecore Development Tools

Last week I was honored to be a part of the Sitecore Development Tools Round Table discussion at the 2013 Sitecore Users Virtual Summit. Talking with a team of seasoned Sitecore developers, we discussed the tools and add-ons that we each use during our everyday Sitecore development.

Read More

By

Setting the Item SortOrder value in Sitecore Rocks Query Analyzer

This post discusses how you can utilize the Sitecore Rocks Query Analyzer to set the sort order of items in the Sitecore Content Management System.

In Sitecore, items are sorted by their value stored in the Standard Field __Sortorder. Typically, when adding items, Sitecore will separate these values by 100. Then when an item is resorted, Sitecore will determine where it is sorted to, and adjust it’s __Sortorder value accordingly. Usually this means splitting the difference between the sort order values of the items it has been placed in between.
01 - Sort Value

After many sort order changes, it’s possible that Sitecore will find it has run out of integers that it can split, so it will change all of the sort order values of the items to be 100 apart again, still keeping the same relative order.

It’s ok to be negative

One thing I found recently was that the __Sortorder field can contain negative values, and still function properly. You can manually set -5000 in the __Sortorder field on an item, and be fairly confident that it’ll be sorted to the top.

Even if you move an item above one that’s been set with a negative value, Sitecore will use a more negative value to ensure it can keep the order of items in check.

So when is this useful?

Sometimes reordering can be a tedious process, particularly if you have the same structure in multiple places.
Also, clicking and dragging each item, can be time consuming.
So how can you speed up the process?
You can write specific sort order code if you want them all the same. But that will require a build, and will always keep the sort order fixed to the way the code intends, not allowing manual changes later.

Or, if you just want to set it once, you can utilize the inline editing feature of the Sitecore Rocks Query Analyzer result set.

Grab all the items you’re after, displaying the __Sortorder field in the results.
02 - Query Analyzer results

Double click the cells for the items and set them to negative values.
03 - Editing Sort Order

Once that’s done you can refresh the content tree and see your items resorted the way you want them.
04 - Sorted items

By

Sitecore Publish Queue and Incremental Publish

I’ve recently been looking into the Publish Queue and using Incremental publish on our projects.
Out of the site publish modes available, Incremental publish is the quickest publishing option.

I wanted to look into how this works.
In the past we’ve always made our updates and individually published every changed item on it’s own. This can be very time consuming so I wanted to see if there’s a better way.

Ways to View the Publish Queue

Using the Sitecore API

I found some different ways to view the publish queue.

Beginning with Brian Pedersen’s blog post I wrote an application that simply lists the publish queue using his ‘current view’ method.

Sitecore.Data.Database master = Sitecore.Data.Database.GetDatabase("master");
Sitecore.Data.Database web = Sitecore.Data.Database.GetDatabase("web");
 
Sitecore.Publishing.PublishOptions options = new Sitecore.Publishing.PublishOptions(master, web, Sitecore.Publishing.PublishMode.Incremental, Sitecore.Globalization.Language.Parse("en"), DateTime.Now);
 
// Get all the publishing candidates
System.Collections.Generic.IEnumerable candidates = Sitecore.Publishing.Pipelines.Publish.PublishQueue.GetPublishQueue(options);

Using Sitecore Rocks

In Rocks you can access the publish queue through the context menu by right clicking on an item in Sitecore Explorer and choosing
Tools -> Publishing -> Publish Queue
Publish Queue - Sitecore Rocks
Publish Queue - Sitecore Rocks

Note: You can also access this quickly using Commandy or by adding the selection to your favourites if you use it often enough.

Looking at the SQL table dbo.PublishQueue

If you open up SQL Server and locate the Publish Queue table in your master database you can view all the entries that Sitecore has made to it.
Publish Queue - SQL Table

Comparing all the queues

When looking at these three options I found that I was getting slightly different subsets in each.
The largest set of results came from the SQL Server table, while the smallest set came from the API code.

I noticed the following:-

  • The SQL table could contain multiple references to the same item. I assume this means that the one item could have been edited multiple times, and been added to the table each time.
  • The Rocks Publishing Queue viewer contained singular references to all items found in the SQL table.
  • The API code gave a subset of the Rocks queue, and only listed items that had been updated relatively recently.

How does incremental publish work with the Publish Queue

The incremental publish works the same way as the API code above. I found that the API code only grabs items that were updated more recently than the date and time of the last incremental publish.
Sitecore stores the date and time of the last publish in the dbo.Properties table for every target database and language.
This can also be accessed in code using:-

Database.Properties.GetLastPublishDate(Database target, Language language)

Code Reference

This is also how the Incremental Publish works. Sitecore grabs all the items from the Publish Queue table that were modified more recently than the last publish date.

By doing this, only recently changed items (in the final workflow state) will be published.

By

Sitecore Rocks: Presentation with the Layout Designer

I originally published this post on the Igloo blog.

Recently I’ve been attempting to setup pages by adding sublayouts and renderings through the interface in Sitecore Rocks. I thought I’d share some of my experiences.

Note: When explaining my findings here I am referring how Sitecore Rocks deals with presentation settings in version 0.7.15.3. These features may change in future versions.

Read More