Sitecore: Create your first rendering component

We are going to be creating a rendering component. It will be a very simple component, you will have an idea how everything works, and then you will go ahead and create something more complex.

First things first is the checklist:

  1. Create a physical file in the path inetpub\wwwroot\tonySample\Website\xsl. 
  2. Create an item in Content Editor Tree in the Layouts\Renderings.
  3. And then you can insert wherever you like.

So lets begin:

Create an XSLT file, name it something that will be familiar to you, we will use an example and call it (component_tony.xslt).


Next we will add some code to the XSLT file:


sitecore.component/component_tony.xslt – Get the raw code here

Now save it and lets go to the Sitecore.

Create a Rendering Component, name it whatever you wish, as you can see below I named my component Tony Rendering Component.


In the Data section of your component item. Go ahead make the following changes:


Now if you insert this component somewhere on the page, it will show you the content that is included in the XSLT file.

Enjoy! Hope this helps. If there is any questions, please do not hesitate to ask.

SiteCore Power Shell Extension Web API

This Tutorial will allow you to create a custom script that you can execute from the browser URL.


What do you need in order to perform this tutorial

SiteCore PowerShell Extension

Download and Install SiteCore PowerShell Extension. Access it from the SiteCore Desktop.


Add a small custom Script:


This script will give you last 20 lines of the log file. Or you can specify a different log file name and different length of lines. Commands are below

if($length -eq $null){
$length = 30

if($logType -eq $null){
$logType = “log”

Get-ChildItem “$($SitecoreLogFolder)\$LogType*.*” |
Sort-Object -Descending LastWriteTime |
Select-Object -First 1 |
Get-Content -Tail $length

In order for this to work. You need to enable restfulv2 in your Cognifide.PowerShell.config. which is located in Website\App_config\Include\Cognifide.PowerShell.config

<restfulv2 enabled=”true” requireSecureConnection=”false“>

Commands that you can run from the browser while logged in are the following:

Hopefully this helps.

If you have any questions ask me on tmamedbekov or comment below.