Posts

Showing posts from 2019

Configure Insert Option In Sitecore

Image
In most Sitecore projects, the developer is required to set insert options to Sitecore item/content/page which will be used by Sitecore content author. Insert options can include data template, branch template and command template.  Why we need insert option? Basically when you want to give the permission to author content for creating the content that time we enforced author to create content specifically permitted. whatever we want! Only administrator can add content or folder under the particular folder. a. The insert from template option only allow to admin to select existing template or folder whatever he want. author allow only whatever admin set. b. it helps you to enforce the user could possibly insert. So Let's implement Insert option. it's very easy to implement on template's standard values. Just go on existing template and select standard value. In ribbon button just go on configure tab. And click  on the assign button. it will open n

Configure Unicorn in Sitecore items for synchronization

Image
                                  Unicorn is a utility for Sitecore that solves the issue of moving templates, renderings, and other database items between Sitecore instances. This becomes problematic when developers have their own local instances - packages are error-prone and tend to be forgotten on the way to production. Unicorn solves this issue by writing serialized copies of Sitecore items to disk along with the code - this way, a copy of the necessary database items for a given codebase accompanies it in source control. The major benefit of this tool is free compare to TDS. So Let’s play with Unicron step by step. 1.      How to install unicorn with your Sitecore Instance?      Here As per your project structure you can create separate module or you can go ahead with existing module. I always preferred separate module for that so let’s move on the project. a.      Move in your visual studio project and right click on that and select ‘Manage Nuget Packag

Export data to Excel file with MVC C#

Most of the time  it is required to export data into Excel file in Application. So i have tried many ways but i found very simple code for that. Sometime we need to hit by ajax call sometimes direct action link. so personally i like direct hit we don't need to redirect anywhere on button click. i have use this code to export excel file in mvc. let's go through the code. So on controller level we have to define one method look like- now you can see here i have defined  void type method not ActionResult. ///controller Action Method public void ExportExcel() { Export export = new Export(); export.ExcelExportMethod(Response); } Second we have to create class by Export name and under class create one method looks like- public void ExcelExportMethod(HttpResponseBase Response)     {         var grid = new System.Web.UI.WebControls.GridView();         grid.DataSource = //need to pass Data in list type;         grid.DataBind();         Response.Cle

Install and Configure TDS (Team Development For Sitecore ) in Sitecore

Image
If you are a Sitecore developer and you are working with a team then i am sure you will need to serialize your items to take under one roof. so that any team member take it easily. So we have two ways to do these things. a. Create a package and install b. Use TDS/Unicorn to sync your items. first approach personally i don't like because it will take too much time and creation a package a headache. So i will prefer second approach due to flexibility and maintainability. right now i am choosing TDS. Unicorn setup we will create later so in this post we will install and configure TDS. What is TDS? Team Development for Sitecore (TDS) gives you the ability to keep track of all the Sitecore items in your project, by bringing them into a Microsoft compliant Source Code Control system. Using TDS, you will improve the control and overall performance of the team and your project. it have many benefits like your all Sitecore items and code are stored in a single repository, m