Posts

Showing posts from 2018

SXA Showcase site with all components used

Image
I was searching online to find any samples for SXA components usage, but I come know there is already a site implemented using almost all the SXA components, and this site is called SXA Showcase. We can find this site from the following url ( https://github.com/Cognifide/Sitecore.XA.Showcase ) and download its source code to local and get your hands dirty J Steps to configure this site to local: ·          Install Plain Vanilla sitecore instance ·          Install SXA and Sitecore Powershell ·          Open the source code in Visual studio and restore all nuget packages that were missing ·          Finally update the unicorn contents serialized path to your physical drive path where you have downloaded the source code in Sitecore.XA.Project.Showcase.User.config file. Example : C:\SXAProject\SXA showcase\Sitecore.XA.Showcase-master <? xml version = " 1.0 " ?> < configuration xmlns:patch = " http://www.sitecore.net/xmlconfig/ &q

Signal R and Sitecore

I have assigned a task to create a registration page, and after successful registration the user name should be broadcast to everyone who is on the page. So initially I thought of using Ajax Pooling and then thought of using signal R as it needs a Real Time processing to continuously monitoring the user who are all registering. Let’s get started to implement this with Sitecore MVC. Step 1: Add NuGet Signal R package. Step 2: Add the HUB which includes all Services that accessible from Client/Server using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Threading; using System.Threading.Tasks; using System.Web; using Microsoft.AspNet.SignalR; namespace Sitecore.Feature.User.Repository {     public class SignalRHub : Hub     {         public void Send( string userName)         {             // Call the UpdateRegisterUser method to update clients.             Clients.All.Upd

Sitecore-Sitemap splitting into multiple files based on languages code

First, generate the sitemap for the Multi-Language website using an any online tool available, it will generate a sitemap for all the pages into a single file with different language code URLs. Lets split the sitemap to individual language specific sitemap file for easy SEO access. XDocument document = XDocument .Load( "D:\\sitemap.xml" );             var books = from r in document.Descendants( "url" )                         select new                         {                             loc = r.Element( "loc" ).Value.ToLower(),                             lastmod = r.Element( "lastmod" ).Value,                             priority = r.Element( "priority" ).Value                         }; //EN language sitemap             XmlTextWriter enwriter = new XmlTextWriter ( "D:\\sitemap-en.xml" , System.Text. Encoding .UTF8);             enwriter.WriteStartDocument( true );             enwri