Posts

Creating Sitecore RSS Feed

Image
Introduction:  In this blog we will try to setup RSS Feed step by Step. I did try to set up using Sitecore RSS Setup Link   but there are challenges you might come across during the Setup journey. I have tried my best to consolidate all the relevant errors with their solution.  Explanation: the very first thing we do is create RSS Item. Right click on Home Item and select Insert from template as shown below. fig. 1 Select System -> Feeds -> RSS Feed   as shown below. fig. 2 For the newly created RSS Feed Item, under Data -> Items, click on Insert Link  a popup opens up, Select the Collection you want to keep an eye on in RSS feed. Remember to select the Parent as a sample please check below Image. fig. 3 Click on the any Item in your collection (I assume all the Items are of same template, else select at least one of each type and repeat the below activity ). Click on   Presentation -> Design. A popup will open, select the Fields you w...

Sitecore Dependency Injection Part - 1

Image
Introduction: In this Article we will try to see how we can implement Dependency Injection with examples. We will continue building on the the glass mapper sample created in our Previous blog. With Inheritance and Interface, we achieve loose coupling, but dependency injection (DI) take it one step ahead. in summary DI takes away all the mapping (which Interface will create which instance) at configuration level. Implementation: 1 -  Setup IServicesConfigurator: First thing to do is create a IServicesConfigurator. At this point it is a bit tricky part. If this is for the first time you are adding " IServicesConfigurator ", You will get first error message stating reference need to be added for " Sitecore.DependencyInjection " after this, the warning Quigley line will still remain on " IServicesConfigurator ". If you hoverover it, you will see it states "needs   Microsoft.Extensions.DependencyInjection   to work but not installed". Here is the catc...

Sitecore Glass mapper ReferenceField (DropLink)

Image
   Introduction: In this post we will see how we can leverage ORM concept in Sitecore as well. We will start with simple project and introduce Glass mapper. Reference Field will be our main focus in the post.  Background: We have updated sitecore Home Page with our Layout and Controller Rendering. Given below is the pictorial view. Layout : Under Layout Section in Content Editor fig-1 Create a mvc Layout. My layout just contain a Place holder as shown below fig-2 for this post we will just be using Static place holder i.e "smain" Rendering: We will be creating a rendering and data source for the same. Under Feature folder create new rendering folder -> than create Controller Rendering. The Controller field will contain , Name Space + Controller Class and with comma separated, we mention which dll contain this class. Action contains Method to hit in the Controller. fig-3 Add the layout and rendering to Home Item as shown below. By This time I hope we all know how to add...

Sitecore MVC Editable Fields

Image
Introduction: In this post we will be focusing on how we can make fields Editable in Experience Editor. We all know that if our view is been created using  "@Html.Sitecore().Field ", the fields are editable in experience editor. but the whole point comes out here is how to make this happen?.  Explanation: Let us continue on the Same example we have been working on Let us try to directly convert the Fields we have using  "@Html.Sitecore().Field". Let us see if this is editable or not. fig-1 Let us publish this and go to Experience editor to find out if we can Edit the same (we all know it wont be editable but for confirmation let us do it and see.) fig-2 All we observe here is when we hover over the Fields both in Mumbai and Hamirpur. we get no option to edit. Let us go back to our Show.cshtml and try converting the Html field into Sitecore editable fields. fig-3 You will see that we have a error. Just to confirm that error is not directly related to the statement me...