Copied to clipboard

Flag this post as spam?

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


  • Amigo 243 posts 568 karma points
    Apr 10, 2014 @ 15:39
    Amigo
    0

    Dynamic list of links

    Hi,

    I need somehow on a documenttype to be able to add items to a list.
    Each item should contain a url and a text, and the backend user should be able to create n items and add them to the list when creating the page. Of cause i need access to the list from razor or a usercontrol or so...

    Any ideas on how this could be done?

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Apr 10, 2014 @ 15:49
    Jan Skovgaard
    0

    Hi Amigo

    Could this perhaps be done using the ultimate picker? You can specify a document type id from, which it should list nodes/items and when items are clicked you can access the id and then fetch the content...

    Does this help? Otherwise try ellaborating a bit more on your scenario and what you want to achieve :)

    Cheers, Jan

  • Amigo 243 posts 568 karma points
    Apr 10, 2014 @ 16:14
    Amigo
    0

    Hi Jan,

    Thanks for helping out again.

    Hmmm, I really dont want a predefined list to choose from...

    What i actually need to render is a <ul> where each <li> is a text link. (url+text)
    I know this is easy posile with a editor, but im hoping not to use the editor for this.

    So I somehow need for the backend user to be able to type each link+text for each item they want in the list on the page.

    I was thinking a multi textbox where each line could contain "text","link"  (But its really not pretty) :-)

    Does it make sence?  

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Apr 10, 2014 @ 16:25
    Jan Skovgaard
    1

    Hi Amigo

    You're welcome :)

    Aaah, now I think I get what it is you want to do.

    What version of Umbraco are you using? If it's below 7 you could perhaps use the simple code editor? and the use Split(); to have each line listed as an array you can loop through?

    Or perhaps you could have a links section, which you refer on a document type using a MNTP?

    Does that make sense?

    /Jan

  • Amigo 243 posts 568 karma points
    Apr 10, 2014 @ 16:36
    Amigo
    0

    Hi Jan,

    Ja maybe just use the split idea anyway....

    I was just thinking if it was possible to do some kind of list window on a documenttype, where user can add items og remove new items with some + and - icon... 
    And each item has n propperties (linkurl, text, etc...)... (without having a predifined list...)

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Apr 10, 2014 @ 16:51
    Jan Skovgaard
    0

    Hi Amigo

    Well perhaps you can use the embedded content package? Can't remember if it works with v4 (newer version and v6. But if you're on v7 perhaps the grid datatype (I think that is what it's called) could be used for this.

    Otherwise it should be pretty straight forward building a custom property editor to allow editors to add/remove links and then render a list based on the amount of links. (If you have the knowledge of course) - I think it would be easy in v7...don't know about former versions though.

    /Jan

  • Amigo 243 posts 568 karma points
    Apr 10, 2014 @ 21:46
    Amigo
    0

    Hi Jan,

    I found what I need: uComponents: Multi-URL Picker

    Works like a charm...

    Happy Umbraco Coding ;-) 

Please Sign in or register to post replies

Write your reply to:

Draft