How to add a link under quick launch using custom actions?

http://msdn.microsoft.com/en-us/library/office/bb802730(v=office.15).aspx
Custom actions allow us to create feature to add a link under site settings, site actions menu and even central admin.
 Is there any way we can extend this feature to allow links being added under quick launch? I tried providing location Microsft.SharePoint.Navigation but that had no effect

hi
you don't need to use custom actions in order to add links to the quick launch menu. It allows to add links programmatically to the menu items collections directly, see e.g.
Adding Links to Quick Launch. From this link check the following example which adds an item under the Lists heading in Quick Launch.:
using System;
using Microsoft.SharePoint;
using Microsoft.SharePoint.Navigation;
namespace ConsoleApp
class Program
static void Main(string[] args)
using (SPSite site = new SPSite("http://localhost"))
using (SPWeb web = site.OpenWeb())
// Get the Links list or create it if it does not exist.
SPList list = web.Lists.TryGetList("Links");
if (list == null || list.BaseTemplate != SPListTemplateType.Links)
// Create the list.
Guid listId = web.Lists.Add("Links", "Interesting hyperlinks", SPListTemplateType.Links);
list = web.Lists.GetList(listId, false);
// Check for an existing link to the list.
SPNavigationNode listNode = web.Navigation.GetNodeByUrl(list.DefaultViewUrl);
// No link, so create one.
if (listNode == null)
// Create the node.
listNode = new SPNavigationNode(list.Title, list.DefaultViewUrl);
// Add it to Quick Launch.
listNode = web.Navigation.AddToQuickLaunch(listNode, SPQuickLaunchHeading.Lists);
Console.Write("\nPress ENTER to continue....");
Console.ReadLine();
Blog - http://sadomovalex.blogspot.com
Dynamic CAML queries via C# - http://camlex.codeplex.com

Similar Messages

  • Add new link on Quick Launch using visual studio

    Hi,
    How can I add new link on quick launch using visual studio?
    I saw many link about developing quick launch or top link bar.
    But they are using visual webpart to develop this function and can add
    when the user add this webpart. How can I add automatically when I deploy the project.
    Thanks in advance!
    Best Regards, wendy

    using System;
    using System.Web.UI;
    using System.Linq;
    using Microsoft.SharePoint;
    using Microsoft.SharePoint.Navigation;
    namespace SPQuickLaunchAddItemWebPart.VisualWebPart1
    public partial class VisualWebPart1UserControl : UserControl
    protected void Page_Load(object sender, EventArgs e)
    CleanUpQuickLaunch(“My Header”);
    AddQuickLaunchItem(“My Header”, “http://www.google.com/q=stuff”, “My Link Here”, “http://www.google.com”);
    CleanUpTopNavigationBar(“My Header”);
    AddTopNavigationBarItem(“My Header”, “http://www.google.com/q=stuff”, “My Link Here”, “http://www.google.com”);
    AddTopNavigationBarItem(“My Header”, “http://www.google.com/q=stuff”, “My Link Here1″, “http://www.google.com”);
    public static void CleanUpQuickLaunch(string header)
    using (SPSite site = SPContext.Current.Site)
    using (SPWeb web = site.OpenWeb())
    web.AllowUnsafeUpdates = true;
    SPNavigationNodeCollection quickLaunch = web.Navigation.QuickLaunch;
    // try to get quick launch header
    SPNavigationNode nodeHeader = quickLaunch.Cast<SPNavigationNode>().Where(n => n.Title == header).FirstOrDefault();
    //if header not found remove it
    if (nodeHeader != null)
    quickLaunch.Delete(nodeHeader);
    public static void CleanUpTopNavigationBar(string header)
    using (SPSite site = SPContext.Current.Site)
    using (SPWeb web = site.OpenWeb())
    web.AllowUnsafeUpdates = true;
    SPNavigationNodeCollection topNavigation = web.Navigation.TopNavigationBar;
    // try to get quick launch header
    SPNavigationNode nodeHeader = topNavigation.Cast<SPNavigationNode>().Where(n => n.Title == header).FirstOrDefault();
    //if header not found remove it
    if (nodeHeader != null)
    topNavigation.Delete(nodeHeader);
    public static void AddQuickLaunchItem(string header, string headerURL, string item, string url)
    using (SPSite site = SPContext.Current.Site)
    using (SPWeb web = site.OpenWeb())
    web.AllowUnsafeUpdates = true;
    SPNavigationNodeCollection quickLaunch = web.Navigation.QuickLaunch;
    // try to get quick launch header
    SPNavigationNode nodeHeader = quickLaunch.Cast<SPNavigationNode>().Where(n => n.Title == header).FirstOrDefault();
    //if header not found create it
    if (nodeHeader == null)
    nodeHeader = quickLaunch.AddAsFirst(new SPNavigationNode(header, headerURL, true));
    nodeHeader.Update();
    //try to get node item under header
    SPNavigationNode nodeItem = nodeHeader.Children.Cast<SPNavigationNode>().Where(n => n.Title == item).FirstOrDefault();
    //If item not found under heading then create it
    if (nodeItem == null)
    nodeItem = nodeHeader.Children.AddAsLast(new SPNavigationNode(item, url, true));
    else
    nodeItem.Url = url;
    nodeItem.Update();
    nodeHeader.Update();
    public static void AddTopNavigationBarItem(string header, string headerURL, string item, string url)
    using (SPSite site = SPContext.Current.Site)
    using (SPWeb web = site.OpenWeb())
    web.AllowUnsafeUpdates = true;
    SPNavigationNodeCollection topNavBar = web.Navigation.TopNavigationBar;
    // try to get quick launch header
    SPNavigationNode nodeHeader = topNavBar.Cast<SPNavigationNode>().Where(n => n.Title == header).FirstOrDefault();
    //if header not found create it
    if (nodeHeader == null)
    nodeHeader = topNavBar.AddAsFirst(new SPNavigationNode(header, headerURL, true));
    nodeHeader.Update();
    //try to get node item under header
    SPNavigationNode nodeItem = nodeHeader.Children.Cast<SPNavigationNode>().Where(n => n.Title == item).FirstOrDefault();
    //If item not found under heading then create it
    if (nodeItem == null)
    nodeItem = nodeHeader.Children.AddAsLast(new SPNavigationNode(item, url, true));
    else
    nodeItem.Url = url;
    nodeItem.Update();
    nodeHeader.Update();
    above code demonstrate how to add node inside the quick launch and top navigation.
    you can also follow the below link.
    http://myspexp.com/2012/04/30/adding-items-to-your-quick-launch-or-top-navigation-programmatically/
    Hiren Patel | Please click "Propose As Answer" if this post solves your problem or "Vote As Helpful" if this post has been useful to you.

  • How to add a link under "you can also" in UWL

    Hi Experts,
      There is an UWL inbox in portal.  some tasks are receiving from FI (Financials) under "Subject".  If I select the task, it is displaying some details about that task with approve, reject,..... buttons. and in the right side, under "you can also:", View history link is there by default.  If i want to add/display a new link under this, where can i make the changes?
    If i see this in backend, that link is displaying.  whereas in portal, that link is not appearing.
    so where i have to configure that link in portal?
    pls send ur replies very urgent issue.  i read documents. but i did not find solution for this
    regards,
    Vila.

    Hi,
    Can you help me? How did you resolve this? I also have the same requirement.

  • How to add a Link to a custom Search Componnent (HTMLB)

    Hi all,
    i developed a custom Search Component for the Search iView based on the <a href="https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/41cbcb56-0701-0010-43b4-fbc138ea2b6a">Tutorial</a> (CodeSamples Section) from Thilo Brandt. It extends the BaseCompositeComponent and implements the iSearchComponent. In the Tutorial he creates the Elements (Checkboxes, links, etc.) in the Method "renderComponent()". He also creates a Link, but i need it with a different function. The link in the tutorial a releases a new search roundtrip. I need to open a new Bowserwindow and show the content of a specified URL. How can i do that?
    The second Problem is that i have to show an icon for the Link. I added an Image to the the Project to the /dist/images Path. But how can i access this resource? The following code shows xou the Problem. I need to fill the variable pathToImage.
    Link linkToHelp = new Link(this.createCompositeComponentId("HELPLINK"));
    Image helpImage = new Image(<b>pathToImage</b>,"Help");
    linkToHelp.addComponent(helpImage);
    Thank you for answers.
    Marcus

    hi
    you don't need to use custom actions in order to add links to the quick launch menu. It allows to add links programmatically to the menu items collections directly, see e.g.
    Adding Links to Quick Launch. From this link check the following example which adds an item under the Lists heading in Quick Launch.:
    using System;
    using Microsoft.SharePoint;
    using Microsoft.SharePoint.Navigation;
    namespace ConsoleApp
    class Program
    static void Main(string[] args)
    using (SPSite site = new SPSite("http://localhost"))
    using (SPWeb web = site.OpenWeb())
    // Get the Links list or create it if it does not exist.
    SPList list = web.Lists.TryGetList("Links");
    if (list == null || list.BaseTemplate != SPListTemplateType.Links)
    // Create the list.
    Guid listId = web.Lists.Add("Links", "Interesting hyperlinks", SPListTemplateType.Links);
    list = web.Lists.GetList(listId, false);
    // Check for an existing link to the list.
    SPNavigationNode listNode = web.Navigation.GetNodeByUrl(list.DefaultViewUrl);
    // No link, so create one.
    if (listNode == null)
    // Create the node.
    listNode = new SPNavigationNode(list.Title, list.DefaultViewUrl);
    // Add it to Quick Launch.
    listNode = web.Navigation.AddToQuickLaunch(listNode, SPQuickLaunchHeading.Lists);
    Console.Write("\nPress ENTER to continue....");
    Console.ReadLine();
    Blog - http://sadomovalex.blogspot.com
    Dynamic CAML queries via C# - http://camlex.codeplex.com

  • How to add new links to a page

    Hello Community
    In Sharepoint 2013 Server can you create:
    A Link in the left navigtion bar  or Quick Launch
     when clicked it can open a new page  and on that page there is an “Add New” type of 
    button. 
    Then on that page you can add as many links as the page will allow, each 
    of those links can contain a url
        Thank you
        Shabeaut

    Hi,
    To add a new link on the left nav:
    You can go to site settings> navigation> add a link under "current navigation".
    For the second requirement:
    You can create a "links" list and add it to that second page. This way you can have that "Add Links" option and add links.
    Thanks,
    norasampang

  • How to add a new column (Project Number) in the action items table under NPD Module?

    There are two projects with same name and created by same person in NPD.
    So when it is displayed in "Action Items" table, It looks similar.
    To avoid this, I need one more column (Project Number) to be added in the "Action Items" table and " Strategic briefs and projects" table.
    So, How to add a new column (Project Number) in the "Action Items" table and " Strategic briefs and projects" table under NPD Module?
    Please do the needful.

    There is no out of the box configuration available to add columns to NPD action items.   As always we welcome enhancement requests. 
    Thanks
    Kelly

  • How to add a link to your message

    Does anyone know how to add a link to a message?

    laptopman,
    As Klaus1 posted, you can also use the Character Palette.
    In the Palette, select View : Glyph > Glyph Catalog. You will find the , among others, there.
    You can copy & paste, or position the cursor where you want the glyph in a document, highlight the glyph, and click on Insert with Font.
    If the Character Palette is not in your Menubar, open System Preferences > International > Input Menu: Checkmark Show input menu in menubar.
    To open the Palette, click on the Flag icon in the Menubar, and select Show Character Palette.
    ali b

  • How to add a link button in system form?

    how to add a link button in system form in the edit text?

    HI
    see the following code
    This creates an item "55" caption, and exittext ("550") and creates linked button "51" linked to "550"
            oItem = otmpform.Items.Add("55", SAPbouiCOM.BoFormItemTypes.it_STATIC)
            With oItem
                .Top = 315 + 30 + 15
                .Left = 12
                .Width = 100
                .Specific.Caption = "Többlet"
            End With
            otmpform.DataSources.UserDataSources.Add("550", SAPbouiCOM.BoDataType.dt_SHORT_TEXT)
            oItem = otmpform.Items.Add("550", SAPbouiCOM.BoFormItemTypes.it_EDIT)
            With oItem
                .Top = 315 + 30 + 15
                .Left = 120
                .Width = 100
                .Specific.DataBind.SetBound(True, "", "550")
                .AffectsFormMode = True
                .Description = otmpform.Items.Item("55").Specific.Caption
                .DisplayDesc = True
            End With
            oItem = otmpform.Items.Add("551", SAPbouiCOM.BoFormItemTypes.it_LINKED_BUTTON)
            With oItem
                .Top = 316 + 30 + 15
                .Left = 120 - 14
                .Width = 13
                .LinkTo = "550"
                .Specific.LinkedObject = SAPbouiCOM.BoLinkedObject.lf_GLAccounts
            End With
    Regards,
    J.

  • How to add .js link in custom list form through sharepoint designer 2013

    hi friends
    so far i was adding jquery code to script editor webpart in custom list form.
    but i need to know how to add .js link in custom list form through sharepoint designer 2013
    please help me.

    Hi,
    We can add the "JS Link Property" in the “WebPart” node in the custom list form page through SharePoint designer 2013.
    Here is an example for your reference:
    <JSLink xmlns="http://schemas.microsoft.com/WebPart/v2/ListForm">~site/Style Library/js/custom.js</JSLink>
    Noticed that, we should not lose the 'xmlns="http://schemas.microsoft.com/WebPart/v2/ListForm' attribute.
    Best Regards
    Dennis Guo
    TechNet Community Support

  • How to add mail link in muse

    how to add mail link in muse?

    Just type the e-mail address in the Hyperlink control in the Control Strip.

  • Popup link in Quick launch

    I recently migrated our SP 2010 to SP 2013, Everything migrated well. But in SP 2010 i used to update the quick launch links by going to http://spsite/_layouts/quiklnch.aspx with the Pop up link
    JavaScript:var options=SP.UI.$create_DialogOptions();options.url='http://mylink.com';options.width = 1000;void(SP.UI.ModalDialog.showModalDialog(options))
    But the same when i do in for SP 2013 i am getting url format is invalid
    Can anyone please suggest me an alternative way where i can put the above SP Popup link in Quick launch.
    My whole migration work is stuck because of this issue.
    Thanks.
    Prem Kumar
    - Prem Kumar T D http://www.sharepointbasic.com/

    Hi,
    Path for 15 hive is change
    _layouts to -layouts/15
    for example
    http://spsite/_layouts/15/quiklnch.aspx
    Please mark as answer if your issue is resolve
    Regards, Sachin

  • How to add js files to sharepoint page using sharepoint designer

    how to add js files to sharepoint page using sharepoint designer

    Upload the files to your site collection into the site assets library or into the style library, depending on perference.
    Then you can include the JS files either in the master page, page tempalte or using web parts.

  • Does anyone know how to add a dateline in the website using muse?

    Does anyone know how to add a dateline in the website using muse?

    You cannot.
    You would have to add it to the mail server ( if you have an IMAP account), then it will appear on the ipad.

  • How to add a link in the masthead in the portal

    Hi,
    Actuallly i want to add a new link for ex-help link or user info etc..in the masthead in theportal,can any one please suggest me how to go about it as iam completely new to E.P and have not done any development ,till now have been dealing with support issues ,so your help will be greatly appreciated.
    Regards
    Pooja

    Hi,
    Follow this link,
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/d07bf112-1705-2a10-1a9f-d0a705e550fa
    This article will clearly explain how to add a new link in masthead.
    I hope this is helpful for you. You have any doubt regards this ask me, i will help you.
    Regards
    Prakash T

  • How to add a link to an interactive svg using edge commons library

    Hi,
    I've been playing around with this wonderful Edge Commons interactive SVG tutorial
    My question is : How to add an external link "url" to an interactive svg using edge commons library ?
    Edge commons example file :
    http://edgedocks.com/market/interactive-svg-example-project-edge-commons
    Edge commons  video tutorial :
    http://www.youtube.com/watch?v=4UEB6gaLKuw
    I have adapted this tutorial to an interactive map, http://madudesign.com/works/france/ every thing is going fine until I couldn't figure out to link a particular url on each part of the region of the map.
    I managed to figure out how to change colors on the different parts of the map on mouse over and mouse out but I'm not quite comfortable with JavaScript since I don't use it every day...
    I have tryed to link to an url by passing it on the illustrator layer and via the onclick event (event.target.id) to a simple url
    http://redpen.io/6svh5u
    then working in Edge and publishing on the browser the link returns me a weird url line by replacing the original url slashes "//" by "_x2F_" and I must have misunderstood the proper JavaScript line to open that link from there...
    for example on my actual exemple "http://madudesign.com/works/france/"
    the first top region of France is normally a link to "http://www.google.com" and it returns "http:_x2F__x2F_www.google.com" plus the complete path to the file too...
    I don't know how to get around this trick and have back for each region a particular clean link from the event target id of the svg...
    thank-you for any help
    matt
    link to my edge animate file if needed :
    http://madudesign.com/works/france/carte_de_france.zip

    I got an answer from the Edge Commons dream team and I am very grateful to them :
    "The problem that you bumped into was that you hadn't included a valid URL so far. We weren't sure if you wanted to include them within the SVG file or if you wanted to implement the functionality within Edge Animate. We came up with a solution for the latter one, with a simple switch in the js code:
    You have to type in the appropriate URL of course for all the cases."
    I have to share the final result:
    http://www.madudesign.com/works/france/france_map/
    And the zipped project file:
    http://www.madudesign.com/works/france/france_map.zip
    Thanks to Daniel & Simon
    Matt

Maybe you are looking for

  • A few feature requests and problems

    This mail is going to have several requests for improvement on the Oracle Help for Java platform. Lest anybody think I'm just complaining, let me say that in general I have been very happy with OHJ. We (ANSYS, Inc: http://www.ansys.com) use it as the

  • SAP-R/3 reports

    Hi, Where to find Sales and Finance reports in SAP-R/3 and how to use that reports in BW. Thanks Asim Edited by: asim khan on Oct 11, 2009 9:44 AM

  • Same application to be run from 2 domains

    Hi, This is my first post on this thread. I have an application in HTMLDB which is run by a website xxx.oc.au and the company is trying to get another domain xxx.co.nz for newzeland. Based on the URl/Domain the changes have to be made on the applicat

  • Accesibility/tagging changes/fixes in Acrobat Pro 9?

    Hello all-- I'm a Acrobat 8 user wondering if I want to update to Acrobat Pro 9. The only reason I would want to do so is if there are improvements or fixes in the tagging/accessibility features in Acrobat 9 vs. 8. Does anyone out there who uses tagg

  • How to change Time (Zone) that Project On-Line install defaults to

    We are using Project Online. and the time displayed eg., Job Queue, is 3 hours behind.  ie., it is displaying Pacific time, but we are in the Eastern Time zone.  Can we change it?  If so how? Thanks in advance, \Spiro Theopoulos, Montreal, QC (Canada