Copied to clipboard

Flag this post as spam?

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


  • Owain Williams 482 posts 1414 karma points MVP 7x c-trib
    Feb 01, 2017 @ 14:29
    Owain Williams
    0

    Document Type help.

    Hi This is more a 'can it be done' sort of question than 'how do I do it'. I want to learn but at the same time I can't think how I could achieve what I'm looking to do.

    I want to have a navigation bar which I can create unlimited number of links from or should I say, allow an editor to create.

    I'm thinking a text box called 'navigationText' and another text box called 'navigationURL'. The editor would enter in the text e.g. Contact Us and the url could be 'http://something.com/something'

    They could then click a button to 'add more links' and each time they do this, the navigation would increase.

    This might sound like a strange thing to be doing but I'll try and explain why. The main website will be hosted on a separate system so I need to be able to hardcode the links or give the editor this option.

    Can this be done with Document Types or should I be looking somewhere else?

    Not sure if I have explained myself very well but if you have any questions, please ask :)

  • Ronish Potiah 19 posts 171 karma points
    Feb 01, 2017 @ 14:36
    Ronish Potiah
    100

    Hi Owain,

    You can use the umbraco native related-links to get going.

    Here is how you can use it related-links

    On your document type, click to add property and choose related links data type.

    enter image description here

  • Owain Williams 482 posts 1414 karma points MVP 7x c-trib
    Feb 01, 2017 @ 14:41
    Owain Williams
    0

    Thanks for the quick reply. This looks perfect!

    :)

  • Dennis Adolfi 1082 posts 6450 karma points MVP 6x c-trib
    Feb 01, 2017 @ 14:43
    Dennis Adolfi
    0

    Hi Owain.

    This could very much be a doctype solution, it sounds like you have a good plan. May I suggest however that you have a look at Nested Content? It's pretty much the same setup as you where mentioning, however instead of having a singe child for every menu-option, they would all be listed on the 'Home' node for example. Have a look at Nested Content: https://our.umbraco.org/projects/backoffice-extensions/nested-content/ (Or you could consider to list the menu items in a List-View, depending on your structure.)

    However a much simpler and in my opinion cleaner way of doing this is using a package called RJP.MultiUrlPicker property. It's pretty much exactly what you need: You can select an internal/external link, a title and a text, and that's it! No need for menu item doctypes. I use this package for 90% of all my project menus: https://our.umbraco.org/projects/backoffice-extensions/multi-url-picker/

    Best of luck!

  • Owain Williams 482 posts 1414 karma points MVP 7x c-trib
    Feb 01, 2017 @ 14:56
    Owain Williams
    1

    Thanks Dennis, I was going to look at packages but because I'm trying to learn how to use Umbraco from a dev point of view I thought I'd try and stay clear of packages just now. Yes, it might add time to my project but the knowledge I will hopefully gain will be worth it.

    I will look at the package though for future reference. I'll also look at nested content.

    Thanks.

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies