Posts

Showing posts with the label Quick Launch Section

How to Hide Top Bar, Ribbon, Quick Launch in SharePoint 2010?

Hi, Here i'm going to explain How to Hide Top Bar, Ribbon, Quick Launch in SharePoint 2010. Top Bar, Ribbon, Quick Launch are come up with Application Pages by default. If you want to open the page in Dialog Framework then those elements will take more space and make the layout cluttered. One way to hide these controls is by passing a Parameter with the URL. [ ?IsDlg=1 ] SharePoint will hide these elements when It gets IsDlg Parameter on URL.  Eg:   http://localhost:5010/Lists/TestList/NewForm.aspx?IsDlg=1 But every time we can't pass these parameters. Then how to get rid of these elements? Simple Just add the below css Code in Application Page under PlaceHolderMain section. < style   type ="text/css">      #s4-ribbonrow ,  .ms-cui-topBar2 ,  .s4-notdlg ,  .s4-pr   s4-ribbonrowhidetitle ,  .s4-notdlg   noindex ,  #ms-cui-ribbonTopBars ,  #s4-titlerow ,  #s4-pr   s4-notdlg   s4-titlerowhideti...

Add multiple target audience groups to SharePoint Quick Launch Node

private void SetAdminViewAudience(SPNavigationNode node)         {             if (quickLaunchItem.Properties.Contains("Audience"))             {                 node.Properties["Audience"] = ";;;;" + Group1+","+ Group2 +","+ Group3+","+etc... "";             }             else             {                               node.Properties.Add("Audience",  ";;;;" + Group1+","+ Group2 +","+ Group3+","+etc... "" );             }             node.Update();         }

Adding Navigation Links To Quick Launch Bar Programatically (SharePoint 2010)

using System; using System.Collections.Generic; using System.Linq; using System.Text; using Microsoft.SharePoint; using Microsoft.SharePoint.Administration; using Microsoft.SharePoint.Navigation; using Microsoft.SharePoint.Publishing; namespace ConsoleOperations {     class AddingNavigationLinks     {         static void Main(string[] args)         {             using (SPSite site = new SPSite("http://localhost:5030"))             {                 site.AllowUnsafeUpdates = true;                 using (SPWeb web = site.RootWeb)                 {                     SPNavigationNodeCollection nodeColl = web.Navigation.QuickLaunch;                    ...

Set Audience for Quick Launch Navigation Links Programmatically

using System; using System.Collections.Generic; using System.Linq; using System.Text; using Microsoft.SharePoint; using Microsoft.SharePoint.Administration; using Microsoft.SharePoint.Navigation; namespace ConsoleOperations {     class TargetAudienceToNavigationNodes     {         static void Main(string[] args)         {             using (SPSite site = new SPSite("http://localhost:5030"))             {                 using (SPWeb web = site.RootWeb)                 {                     SPNavigationNodeCollection nodeColl = web.Navigation.QuickLaunch;                     SPNavigationNode nodeHeader = new SPNavigationNode("TestNode", @"Lists/Tasks/AllItems.aspx", false);     ...

re-ordering navigation for quick launch section (SharePoint2010)

using System; using System.Collections.Generic; using System.Linq; using System.Text; using Microsoft.SharePoint; using Microsoft.SharePoint.Administration; using Microsoft.SharePoint.Navigation; namespace ConsoleOperations {     class MovingNavigationLinks     {         static void Main(string[] args)         {             using (SPSite site = new SPSite("http://localhost:5030"))             {                 site.AllowUnsafeUpdates = true;                 using (SPWeb web = site.RootWeb)                 {                     int moveToHeadingIndex = 0;                     var nodesToMove = new List<SPNavigationNode>();       ...