Skip to content

Instantly share code, notes, and snippets.

@joinsukesh
joinsukesh / ReadStaticRenderingProperties.cs
Last active July 8, 2019 06:09
Read static rendering properties
public ActionResult SubscribePopupController()
{
string sectionTitle = RenderingContext.Current.Rendering.Properties["Title"];
string sectionDescription = RenderingContext.Current.Rendering.Properties["Description"];
}
using Sitecore;
using Sitecore.Data.Items;
using System;
using System.Collections.Generic;
using System.Data;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Web;
using Sitecore.Data.Items;
using System.Collections.Generic;
public class ItemInfo
{
public ItemInfo(string itemName, string itemTemplate, string parentItem)
{
ITEM_NAME = itemName;
ITEM_TEMPLATE = itemTemplate;
PARENT_ITEM = parentItem;
using Sitecore;
using Sitecore.Data;
using Sitecore.Data.Items;
using Sitecore.SecurityModel;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
public class SitecoreHelper
@joinsukesh
joinsukesh / ImportExcelToData.cshtml
Created January 8, 2019 06:52
Import Excel To Sitecore Data
<form>
<div class="form-group">
<label>Choose File</label>
<input id="fupExcel" type="file" required />
</div>
<div class="form-group">
<label>Start From Row</label>
<input id="txtStartFromRow" type="text" placeholder="Data will be processed from this row of excel sheet"/>
</div>
<div class="form-group">
@joinsukesh
joinsukesh / Corlate Code Part 9 - BlogCategory.cs
Created December 13, 2018 13:23
Corlate Code Part 9 - BlogCategory.cs
namespace Corlate.Feature.PageContent.Models
{
using Sitecore.Data.Items;
public class BlogCategory : CustomItem
{
public BlogCategory(Item innerItem) : base(innerItem) { }
public string TitleID
@joinsukesh
joinsukesh / Corlate Code Part 9 - BlogTag.cs
Created December 13, 2018 13:23
Corlate Code Part 9 - BlogTag.cs
namespace Corlate.Feature.PageContent.Models
{
using Sitecore.Data.Items;
public class BlogTag : CustomItem
{
public BlogTag(Item innerItem) : base(innerItem) { }
public string TitleID
@using Corlate.Feature.PageContent.Models
@using Sitecore.Mvc
@model ContactUsFormSource
@{
Layout = null;
<style>
.validation-msg{
font-size: 12px;
margin-left: 10px;
color:red;
namespace Corlate.Feature.PageContent.Controllers
{
using Corlate.Feature.PageContent.Models;
using Corlate.Foundation.Common.Models;
using Corlate.Foundation.Common.Utilities;
using Sitecore.Data;
using Sitecore.Data.Items;
using System.Collections.Generic;
using System.Web.Mvc;
namespace Corlate.Feature.PageContent.Models
{
public class ContactUsFormData
{
public string Fullname { get; set; }
public string Email { get; set; }
public string Subject { get; set; }