My new blog present here.

Featured Post

Insights into Sitecore Search: A Definitive Introduction

A key component of digital experience management is effective information retrieval. A simplified approach is required for websites, applications, and platforms containing a lot of material so that consumers can easily get the data they require. This need is met by Sitecore, a well-known name in the field of digital experience platforms (DXPs), which provides powerful and comprehensive search functionality. We will travel into the realm of Sitecore Search in this article, learning about its capabilities, architecture , and the enormous value it offers both developers and end users. Introduction to Sitecore Search    A headless content discovery platform powered by AI , Sitecore Search enables you to build predictive and custom search experiences across various content sources. To extract and index you

Accessing SharePoint Quick Launch menu (SPNavigation.QuickLaunch) using C#:

Accessing SharePoint Quick Launch menu (SPNavigation.QuickLaunch) using C#:
With the help of SPNavigation, we will be able to access the Quick Launch menu of SharePoint site. Sometimes we need to show/hide Quick Launch menu item, so with the help of SPNavigation. QuickLaunch, we can loop through Quick Launch menu item.
In this example we will access Quick Launch menu:


using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Office.Server;
using Microsoft.Office.Server.Administration;
using Microsoft.Office.Server.UserProfiles;
using Microsoft.SharePoint;
using System.Web;
using Microsoft.SharePoint.Navigation;


namespace GetQuickLaunch
{
class Program
{
static void Main(string[] args)
{

using (SPSite site = new SPSite("http://amitkumarmca04.blogspot.com/"))
{
using (SPWeb web = site.OpenWeb())
{
SPNavigationNodeCollection qlNodes = web.Navigation.QuickLaunch;
foreach (SPNavigationNode node in qlNodes)
{
Console.WriteLine(node.Title + "--" + node.Url);
}
}
}
}
}
}




Reference: MSDN

Comments

Popular posts from this blog

Sitecore GraphQL Queries

Twenty 20 Masti:

Sitecore Experience Edge GraphQL Queries