If you are new to Sitecore development, then I would strongly recommend looking at Sitecore Rocks to help you speed up your development. Sitecore Rocks is a visual studio plugin that lets you do a number of useful time-saving things with your Sitecore instance, without having to log into the Sitecore directly. This can save you a lot of time during development. If you haven’t installed Sitecore Rock yet, then I would suggest you read, How To Install Sitecore Rocks first. In today’s tutorial, I’m going to cover the most features I use.
Publishing A Sitecore Item And All Of It’s Dependencies
If you can’t use TDS on a project, trying to remember everything that’s included in a release that needs to be published, can be very annoying. There is nothing worse than adding a control onto a page and then it not rendering because something hasn’t been published. Using Sitecore rocks, you can publish an item and all of its dependencies! No more wasted time trying to track down content issues.
To do a publish with dependencies, right-click on the Sitecore item you want to publish, select ‘Tools’ -> ‘Publishing’ -> ‘Publish Item and Dependencies’
From here you will see a list of dependencies your layout is reliant on. You can now select what you want to publish and off you go. This tip alone has saved me hours of my life!
Clearing Your Sitecore Cache
No matter what web platform you use, the chances are you will always need to clear your Sitecore cache.
To access the ‘Cache Manager’. In the ‘Sitecore Explorer’, open the Sitecore Rocks Context Menu, select ‘Tools’ then ‘Caches’.
To clear the cache, I normally just select all items in the cache, hit ‘Control’ and ‘A’ (select all), then right-click and select ‘Clear All’. If you click on a single cache item, you can also use the ‘Explore Cache’ option.
This is probably more useful for the web[items] entry and the core[items] entry. From here you can remove individual items from the cache, rather than blat the whole thing.
If you can’t use TDS on your project and you need to copy content from one environment to another one, you can use Sitecore’s in-built Package Manager, but I personally prefer the Sitecore rocks version. I’ve previously written about Sitecore Rocks package manager here, How To Import and Export Sitecore Content
Adding Multiple Items
Another cool feature in Sitecore Rocks allows you to create multiple items of the same type in a single go. If you want to create any type of control like a mega-menu, then this will allow you to quickly knock out dummy pages.
In the Sitecore Rocks explorer, select the location you want to create your page, bring up the context menu and select ‘Add’ -> ‘New Item’.
In here you can see a list of templates you can create. If you look at the bottom left-hand side, you can see an ‘Add’ button with a text box to add in the number of items that you want to create.
Add in the quantity you want and sit back and let Sitecore generate the items for you. In the Sitecore explorer, you can then set the items properties.
Viewing The Sitecore Logs In Visual Studio
This is another useful day-to-day tip. The Sitecore error logs can be found in your website’s data folder. When you try and debug errors, it can be annoying to have to tab between Chrome, IIS, Visual Studio, Windows Explorer and notepad. Instead, using Sitecore Rocks, you can view all the Sitecore log file information within Visual Studio.
In Sitecore Explorer, right-click on an item to bring up the Sitecore Rocks context menu, select ‘Tools’ -> ‘Log Viewer’.
In the Log Viewer not only do you get a real-time view of the Sitecore logs so you don’t need to constantly update them, you can also filter out the entries to just show errors. This means no more hunting around the Sitecore log files manually, trying to find the cause of your problems.
In today’s guide, I’ve hopefully demonstrated why using Sitecore Rocks will save you a lot of time in development and is a must for any Sitecore developer. Sitecore rocks has a lot of features, including a lot that I haven’t covered.
The aim of this post is to try and show you why you should install Sitecore Rocks. If you want to know more, please read my other tutorials from the Sitecore Rocks category.