{"id":958,"date":"2019-03-18T08:05:09","date_gmt":"2019-03-18T08:05:09","guid":{"rendered":"http:\/\/blog.softreeconsulting.com\/?p=958"},"modified":"2019-03-18T08:05:09","modified_gmt":"2019-03-18T08:05:09","slug":"how-to-create-structural-navigation-nodes-both-in-quick-launch-and-top-navigation-node","status":"publish","type":"post","link":"https:\/\/softreetechnology.com\/blog\/all\/how-to-create-structural-navigation-nodes-both-in-quick-launch-and-top-navigation-node\/","title":{"rendered":"How to create structural navigation nodes both in quick launch and top navigation node"},"content":{"rendered":"\n<p>Sharepoint customizes navigation feature so that user can navigate to a different location and access them quickly. You can add, edit, or remove links on the left-hand menu (Quick Launch menu), the top menu (Top Navigation Node) through edit links.<\/p>\n\n\n\n<p>In this blog, we are going to create structural navigation node that is root node having subnodes in both top navigation and quick launch.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>using System;\nusing System.Linq;\nusing System.Security;\nusing Microsoft.SharePoint.Client;\nnamespace StructuralNavigationNode\n{\nclass Program\n{\nstatic void Main(string[] args)\n{\nClientContext ctx = new ClientContext(\"http:\/\/portal\/sites\/site1\");\nstring password = \"Password\";\nSecureString secureString = new SecureString();\nforeach (char c in password.ToCharArray()) secureString.AppendChar(c);\nctx.Credentials = new SharePointOnlineCredentials(\"user@domain.com\", secureString);\nctx.ExecuteQuery();\nWeb web = ctx.Web;\n\nNavigationNodeCollection quickLaunchNodeColl = web.Navigation.QuickLaunch; \/\/ we are getting all quick launch node collection\nNavigationNodeCollection topNavNodeColl = web.Navigation.TopNavigationBar; \/\/ we are getting all top navigation node collection\n\nNavigationNodeCreationInformation quickLaunchNodeCreation = new NavigationNodeCreationInformation();\nquickLaunchNodeCreation.Title = \"QuickLaunchNode\";\nquickLaunchNodeCreation.Url = \"http:\/\/www.softreeconsulting.com\/\";\nquickLaunchNodeColl.Add(quickLaunchNodeCreation); \/\/we are creating root quick launch node\nctx.Load(quickLaunchNodeColl);\nctx.ExecuteQuery();\n\nNavigationNode quickLaunchParentNode = quickLaunchNodeColl.Where(n => n.Title == \"QuickLaunchNode\").FirstOrDefault(); \/\/retrieving parent quick launch root node for which we will add sub nodes\nNavigationNodeCreationInformation quickLaunchNodeCreationInformation = new NavigationNodeCreationInformation();\nquickLaunchNodeCreationInformation.Title = \"QuickLaunchSubNode\";\nquickLaunchNodeCreationInformation.Url = \"http:\/\/www.softreeconsulting.com\/about-us\/\";\nquickLaunchParentNode.Children.Add(quickLaunchNodeCreationInformation); \/\/we are creating sub quicklaunch node\nquickLaunchParentNode.Update();\nctx.ExecuteQuery();\n\nNavigationNodeCreationInformation topNavNodeCreation = new NavigationNodeCreationInformation();\ntopNavNodeCreation.Title = \"TopNavNode\";\ntopNavNodeCreation.Url = \"http:\/\/www.softreeconsulting.com\/\";\ntopNavNodeColl.Add(topNavNodeCreation); \/\/we are creating root top navigation node\nctx.Load(topNavNodeColl);\nctx.ExecuteQuery();\n\nNavigationNode topNavParentNode = topNavNodeColl.Where(n => n.Title == \"TopNavNode\").FirstOrDefault(); \/\/retrieving parent top navigation root node for which we will add sub nodes\nNavigationNodeCreationInformation topNavNodeCreationInformation = new NavigationNodeCreationInformation();\ntopNavNodeCreationInformation.Title = \"TopNavSubNode\";\ntopNavNodeCreationInformation.Url = \"http:\/\/www.softreeconsulting.com\/about-us\/\";\ntopNavParentNode.Children.Add(topNavNodeCreationInformation); \/\/we are creating sub top navigation node\ntopNavParentNode.Update();\nctx.ExecuteQuery();\n\n}\n\n}\n}\n<\/code><\/pre>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i1.wp.com\/blog.softreeconsulting.com\/wp-content\/uploads\/2019\/03\/Webp.net-resizeimage.jpg?fit=960%2C342\" alt=\"\" class=\"wp-image-964\" width=\"718\" height=\"255\"\/><\/figure><\/div>\n\n\n\n<p>After code executed, you can see root navigation with their respective subnodes created successfully.<\/p>\n\n\n\n<p><strong>This solution is brought to you by our SharePoint professionals.<\/strong><\/p>\n\n\n\n<p><strong><a rel=\"noreferrer noopener\" aria-label=\"\ufffcSoftree Technolog (opens in a new tab)\" href=\"https:\/\/www.softreetechnology.com\/\" target=\"_blank\"><\/a><a rel=\"noreferrer noopener\" aria-label=\"Softree Technology (opens in a new tab)\" href=\"http:\/\/www.softreeconsulting.com\/\" target=\"_blank\"><\/a><a href=\"https:\/\/www.softreetechnology.com\/\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\"Softree Technology (opens in a new tab)\">Softree Technology<\/a><\/strong>\u00a0employs SharePoint consultants; we are a technology services provider with the aim to help companies achieve exceptional performance through SharePoint. Our dedicated team of SharePoint consultants has the right bent of mind to understand and execute customer requirements.<\/p>\n\n\n\n<p>Be it SPFx or SharePoint add-in developments,\u00a0<strong><a href=\"https:\/\/www.softreetechnology.com\/sharepoint-2019-developments\/\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\"SharePoint 2019 developments (opens in a new tab)\">SharePoint 2019 developments<\/a><\/strong>, web part developments, migrating from SharePoint 2010\/2013 to SharePoint 2013\/2016\/Office 365, Office 365,\u00a0SharePoint hosted apps development\u00a0or something else in SharePoint, we strive to deliver the best<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Sharepoint customizes navigation feature so that user can navigate to a different location and access them quickly. You can add, edit, or remove links on the left-hand menu (Quick Launch menu), the top menu (Top Navigation Node) through edit links. In this blog, we are going to create structural navigation node that is root node having subnodes in both top [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[129],"tags":[222,223,224,225,226],"class_list":["post-958","post","type-post","status-publish","format-standard","hentry","category-all","tag-add-subnodes-to-parent-quick-launch-node","tag-add-subnodes-to-parent-top-navigation-node-using-csom","tag-create-quick-launch-nodes","tag-create-structural-navigation-nodes","tag-create-top-navigation-nodes"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to create structural navigation nodes both in quick launch and top navigation node - Softree Technology<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/softreetechnology.com\/blog\/all\/how-to-create-structural-navigation-nodes-both-in-quick-launch-and-top-navigation-node\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to create structural navigation nodes both in quick launch and top navigation node - Softree Technology\" \/>\n<meta property=\"og:description\" content=\"Sharepoint customizes navigation feature so that user can navigate to a different location and access them quickly. You can add, edit, or remove links on the left-hand menu (Quick Launch menu), the top menu (Top Navigation Node) through edit links. In this blog, we are going to create structural navigation node that is root node having subnodes in both top [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/softreetechnology.com\/blog\/all\/how-to-create-structural-navigation-nodes-both-in-quick-launch-and-top-navigation-node\/\" \/>\n<meta property=\"og:site_name\" content=\"Softree Technology\" \/>\n<meta property=\"article:published_time\" content=\"2019-03-18T08:05:09+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to create structural navigation nodes both in quick launch and top navigation node - Softree Technology","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/softreetechnology.com\/blog\/all\/how-to-create-structural-navigation-nodes-both-in-quick-launch-and-top-navigation-node\/","og_locale":"en_US","og_type":"article","og_title":"How to create structural navigation nodes both in quick launch and top navigation node - Softree Technology","og_description":"Sharepoint customizes navigation feature so that user can navigate to a different location and access them quickly. You can add, edit, or remove links on the left-hand menu (Quick Launch menu), the top menu (Top Navigation Node) through edit links. In this blog, we are going to create structural navigation node that is root node having subnodes in both top [&hellip;]","og_url":"https:\/\/softreetechnology.com\/blog\/all\/how-to-create-structural-navigation-nodes-both-in-quick-launch-and-top-navigation-node\/","og_site_name":"Softree Technology","article_published_time":"2019-03-18T08:05:09+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"Written by":"admin","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/softreetechnology.com\/blog\/all\/how-to-create-structural-navigation-nodes-both-in-quick-launch-and-top-navigation-node\/#article","isPartOf":{"@id":"https:\/\/softreetechnology.com\/blog\/all\/how-to-create-structural-navigation-nodes-both-in-quick-launch-and-top-navigation-node\/"},"author":{"name":"admin","@id":"https:\/\/softreetechnology.com\/blog\/#\/schema\/person\/98740297642f06debccdcee2de84086b"},"headline":"How to create structural navigation nodes both in quick launch and top navigation node","datePublished":"2019-03-18T08:05:09+00:00","mainEntityOfPage":{"@id":"https:\/\/softreetechnology.com\/blog\/all\/how-to-create-structural-navigation-nodes-both-in-quick-launch-and-top-navigation-node\/"},"wordCount":176,"commentCount":0,"publisher":{"@id":"https:\/\/softreetechnology.com\/blog\/#organization"},"image":{"@id":"https:\/\/softreetechnology.com\/blog\/all\/how-to-create-structural-navigation-nodes-both-in-quick-launch-and-top-navigation-node\/#primaryimage"},"thumbnailUrl":"https:\/\/i1.wp.com\/blog.softreeconsulting.com\/wp-content\/uploads\/2019\/03\/Webp.net-resizeimage.jpg?fit=960%2C342","keywords":["Add subnodes to parent quick launch node","Add SubNodes to parent top navigation node using csom","Create quick launch nodes","Create structural navigation nodes","Create top navigation nodes"],"articleSection":["All"],"inLanguage":"en","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/softreetechnology.com\/blog\/all\/how-to-create-structural-navigation-nodes-both-in-quick-launch-and-top-navigation-node\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/softreetechnology.com\/blog\/all\/how-to-create-structural-navigation-nodes-both-in-quick-launch-and-top-navigation-node\/","url":"https:\/\/softreetechnology.com\/blog\/all\/how-to-create-structural-navigation-nodes-both-in-quick-launch-and-top-navigation-node\/","name":"How to create structural navigation nodes both in quick launch and top navigation node - Softree Technology","isPartOf":{"@id":"https:\/\/softreetechnology.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/softreetechnology.com\/blog\/all\/how-to-create-structural-navigation-nodes-both-in-quick-launch-and-top-navigation-node\/#primaryimage"},"image":{"@id":"https:\/\/softreetechnology.com\/blog\/all\/how-to-create-structural-navigation-nodes-both-in-quick-launch-and-top-navigation-node\/#primaryimage"},"thumbnailUrl":"https:\/\/i1.wp.com\/blog.softreeconsulting.com\/wp-content\/uploads\/2019\/03\/Webp.net-resizeimage.jpg?fit=960%2C342","datePublished":"2019-03-18T08:05:09+00:00","breadcrumb":{"@id":"https:\/\/softreetechnology.com\/blog\/all\/how-to-create-structural-navigation-nodes-both-in-quick-launch-and-top-navigation-node\/#breadcrumb"},"inLanguage":"en","potentialAction":[{"@type":"ReadAction","target":["https:\/\/softreetechnology.com\/blog\/all\/how-to-create-structural-navigation-nodes-both-in-quick-launch-and-top-navigation-node\/"]}]},{"@type":"ImageObject","inLanguage":"en","@id":"https:\/\/softreetechnology.com\/blog\/all\/how-to-create-structural-navigation-nodes-both-in-quick-launch-and-top-navigation-node\/#primaryimage","url":"https:\/\/i1.wp.com\/blog.softreeconsulting.com\/wp-content\/uploads\/2019\/03\/Webp.net-resizeimage.jpg?fit=960%2C342","contentUrl":"https:\/\/i1.wp.com\/blog.softreeconsulting.com\/wp-content\/uploads\/2019\/03\/Webp.net-resizeimage.jpg?fit=960%2C342"},{"@type":"BreadcrumbList","@id":"https:\/\/softreetechnology.com\/blog\/all\/how-to-create-structural-navigation-nodes-both-in-quick-launch-and-top-navigation-node\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/softreetechnology.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to create structural navigation nodes both in quick launch and top navigation node"}]},{"@type":"WebSite","@id":"https:\/\/softreetechnology.com\/blog\/#website","url":"https:\/\/softreetechnology.com\/blog\/","name":"Softree Technology","description":"Celebrating 10+ Years in SharePoint Consulting !","publisher":{"@id":"https:\/\/softreetechnology.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/softreetechnology.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en"},{"@type":"Organization","@id":"https:\/\/softreetechnology.com\/blog\/#organization","name":"Softree Technology","url":"https:\/\/softreetechnology.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en","@id":"https:\/\/softreetechnology.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/softreetechnology.com\/blog\/wp-content\/uploads\/2023\/03\/cropped-white-logo-soft.png","contentUrl":"https:\/\/softreetechnology.com\/blog\/wp-content\/uploads\/2023\/03\/cropped-white-logo-soft.png","width":844,"height":230,"caption":"Softree Technology"},"image":{"@id":"https:\/\/softreetechnology.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/softreetechnology.com\/blog\/#\/schema\/person\/98740297642f06debccdcee2de84086b","name":"admin","image":{"@type":"ImageObject","inLanguage":"en","@id":"https:\/\/softreetechnology.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/6fc78c8a7aa3fb0bf43c3b9a2e3962d7?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/6fc78c8a7aa3fb0bf43c3b9a2e3962d7?s=96&d=mm&r=g","caption":"admin"},"sameAs":["https:\/\/softreeconsulting.com"],"url":"https:\/\/softreetechnology.com\/blog\/author\/admin\/"}]}},"_links":{"self":[{"href":"https:\/\/softreetechnology.com\/blog\/wp-json\/wp\/v2\/posts\/958","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/softreetechnology.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/softreetechnology.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/softreetechnology.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/softreetechnology.com\/blog\/wp-json\/wp\/v2\/comments?post=958"}],"version-history":[{"count":0,"href":"https:\/\/softreetechnology.com\/blog\/wp-json\/wp\/v2\/posts\/958\/revisions"}],"wp:attachment":[{"href":"https:\/\/softreetechnology.com\/blog\/wp-json\/wp\/v2\/media?parent=958"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/softreetechnology.com\/blog\/wp-json\/wp\/v2\/categories?post=958"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/softreetechnology.com\/blog\/wp-json\/wp\/v2\/tags?post=958"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}