One of the nice time savers of Sitecore Rocks is creating a view and the matching #Sitecore rendering at the same time.
Right click on the folder you want to create the new view for and select New Item.
You have many options to select from, but in this case I will select Sitecore View Rendering.
A Sitecore explorer window displays and you will be prompted to select a place where you want to create the rendering. Click OK once you select the folder.
In solution explorer you can now see the cshtml file and in Sitecore you can see the corresponding rendering.
This is just one of the shortcuts you can do. I will blog about some more. Let me know what other ones you would like to see.
One of the features I like about Sitecore Rocks is the built in the query analyzer. This has speed things a long when I needed to create simple queries or test some more complex ones. To use the query analyzer is very simple.
Right click on an item and select Tools|Query Analyzer.
This is the screen that appears. Notice on this screen there is also a link to a XPath builder if that is what you prefer.
Simple query, but I like that you can use syntax like T-SQL. You will need to convert it to XPath syntax though if you are using this Sitecore query in your code. Please not the Insert Path and Insert Field links. Those are great shortcuts for building your queries.
So that is the simple overview of the query analyzer. Let me know if you have any questions thanks.
I wanted to show you a few more things that you might find useful when creating/editing templates with Sitecore Rocks.
- Simply right click on the template and select standard values.
- Once standard values are created you have all the options and more in one place to set for the template.
- Parent templates are not complete without insert options. Insert options are easy to set in Sitecore Rocks.
- Using the search function you can find the template(s) you want for an insert option.
- After you have your template set adding a design layout is very simple.
- You can select a main layout first and then after that you have the option to drag a rendering from the Sitecore Rocks explorer or simply click the Add Rendering button.
So those are some more of the basic things you can do with templates and Sitecore Rocks. Please let me know if there is something else you would like to see.
I have always been a big fan of Sitecore Rocks. I am surprised that a lot of Sitecore developers don’t take more advantage of this awesome add on to Visual Studio. In the next couple of weeks I will introduce some features that might make you want to give it a try. Let’s start with the one of the most common things we do in Sitecore. Create templates.
Assuming you have already installed Sitecore Rocks and created a connection to your Sitecore site from Sitecore Explorer let’s get started. (https://marketplace.visualstudio.com/items?itemName=JakobChristensen.SitecoreRocks if you haven’t installed it yet.)
- Right click on the folder you want to create a new template in and name your template. You can also search and add base templates here. (Side not the search feature is powerful.)
- Ok to save and you will now see your newly created template.
- If you right click on your new template you will notice a bunch of options. The main ones that are most commonly used are featured first.
- In the next step we will look at the Template Design option.
Template Field Order
That concludes my first blog post about Sitecore Rocks. There are many other things you can do in the interface with templates. Is there something you would like me to show you please comment below. Stay tuned for more Sitecore Rock tips.