Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Cory Colt 34 posts 130 karma points
    May 16, 2017 @ 17:10
    Cory Colt
    0

    Adding External Link in Main Nav Menu

    I'm curious if I'm just missing something. I want to add a new menu item in the main nav menu, but I want to link this new menu item to an external link. For example, if I have a menu called "Sponsors" and underneath this menu I want "Sponsor 1", "Sponsor 2", and "Sponsor 3", how can I make "Sponsor 2" link to http://someothersite.com instead of an internal page within Umbraco?

    This seems like this would be really common functionality, but there doesn't seem to be an easy solution to this which is crazy to me!

  • Alex Skrypnyk 6175 posts 24186 karma points MVP 8x admin c-trib
    May 16, 2017 @ 17:17
    Alex Skrypnyk
    0

    Hi Cory

    What do you use for the menu? Are you using related links datatype? How your menu is rendering?

    what version of Umbraco are you using?

    Alex

  • Cory Colt 34 posts 130 karma points
    May 16, 2017 @ 17:39
    Cory Colt
    0

    Alex,

    I'm using v7.5.11 and I'm just using the default Fanoe starter kit, so there really isn't anything custom about this site yet this is all out of the box. I was just trying to create the menu when I ran into this problem.

  • Nicholas Westby 2054 posts 7103 karma points c-trib
    May 16, 2017 @ 18:11
  • Cory Colt 34 posts 130 karma points
    May 16, 2017 @ 19:57
    Cory Colt
    0

    Nicholas,

    I appreciate your reply. Would you mind walking me through your implementation of Archetype. I have it installed in my Umbraco and have used the JSON configuration shown in the link you provided, but I'm not seeing how you would implement these menus once you configured them in Archetype? Hopefully that makes sense, if not let me know and I'll try and re-explain what I'm looking for.

  • Nicholas Westby 2054 posts 7103 karma points c-trib
    May 16, 2017 @ 20:06
    Nicholas Westby
    0

    You can configure Archetypes to be nested. That is, you can create a "Menu Items" Archetype that has a "Child Items" property that is of type "Menu Items".

    The idea is that you can add a number of menu items, and each of those menu items can in turn contains sub-menu items. Just like a menu is typically hierarchical, Archetype can mirror the same structure.

    In addition to the "Child Items" property on each menu item, there would be a "Link" property (the type of which would be another Archetype as indicated in the article).

  • Gert Kjerslev 16 posts 67 karma points
    Oct 11, 2017 @ 11:49
    Gert Kjerslev
    0

    Hi Nicholas, I'm trying to do the same as Cory Colt but I'm having some trouble connecting the dots. :-( Also I'm using an older version (7.3.1) of Umbraco. Could you please explain in a more step-by-step way how I ad an external link item to my nav menu. I also using the Default Fanoe Starter kit. Thanks!

  • Nicholas Westby 2054 posts 7103 karma points c-trib
    Oct 12, 2017 @ 07:40
    Nicholas Westby
    0

    Just a heads up, I am preoccupied and won't be able to answer this for about a week.

    If somebody else wants to jump in in the meantime to answer this, that would be awesome.

  • Martin 278 posts 662 karma points
    Oct 13, 2017 @ 08:13
    Martin
    1

    Hi Gert.

    You could just create a page in the content tree that has a property for the page url.

    Create a doc type called Redirect Page.

    Add a property called umbracoRedirect for the url.

    In the Redirect Page Template add the following.

    @inherits Umbraco.Web.Mvc.UmbracoTemplatePage<ContentModels.RedirectPage>
    @using ContentModels = Umbraco.Web.PublishedContentModels;
    @{
        Layout = "Master.cshtml";
    }
    @{
        if(@CurrentPage.umbracoRedirect != "") {
            Response.Redirect(@CurrentPage.umbracoRedirect);
        }
    } 
    
  • Nik 1617 posts 7263 karma points MVP 7x c-trib
    May 16, 2017 @ 20:53
    Nik
    0

    Hey Cory,

    Archetype is pretty flexible so you should be able to create a pretty decent menu with it.

    There is a new package out produced by the Cogworks called MegaNav which could be an alternative if you are finding Archetype overly complex for what you are after. It's got a really nice, intuitive user interface and is just a property editor you can add to your root node. It allows you to create levels, link to documents and (I believe, although haven't tested) external links as well.

    Could be worth checking out.

    Nik

Please Sign in or register to post replies

Write your reply to:

Draft