Copied to clipboard

Flag this post as spam?

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


  • higgsy 65 posts 92 karma points
    Mar 28, 2013 @ 19:40
    higgsy
    0

    Creating a new data type

    Hi all,

    I'm after a data type that will allow me to pick a single node from the content tree, and specify the text for the link and the title for the link. I can't see to find a single package that will do this. I could just add anothter propety to my document type but that's a bit messy.

    So I thought about creating a new data type, but I would appreciate some guidance on my execution plan if anyone can offer anythig.

    1. Create a new DataType using the AbstractDataEditor
    2. Implement some JS to open a modal window with the content tree (Do I need to create a custom service that returns the nodes? I'm not sure how the tree in the modal window is created...do I create a WebForm to handle the request? Is there a built-in service I can call?
    3. Serialise the values stored.
    4. Output them
    The bit I'm confused about is both opening the modal window (looks like I can just grab some code that is currently used by the umbraco Content Picker) and then how the content of the modal window is generated.
    Any help would be greatly appreciated.
    Regards,
    Al

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Mar 28, 2013 @ 20:52
    Jan Skovgaard
    0

    Hi Higgsy

    How do you intend to use the datatype? I'm thinking that you should be able to use the ucomponents url picker datatype? I know it only let's you specify the title of the link, but then you should be able to simply have a text-field for the link defined on the documentype, right after the url picker?

    However you could perhaps suggest this change to the ucomponents team rather than reinventing the wheel? I think it's better to collaborate and contribute to the benefit of all :) You can read more about how to contribute to uComponents here http://ucomponents.org/contribution/

    /Jan

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Mar 28, 2013 @ 20:55
    Jan Skovgaard
    0

    Oh, and if you want to develop your own datatype I don't know if you have had a look at the documentation hee http://our.umbraco.org/documentation/Extending-Umbraco/Property-Editors/PropertyEditorValueConverters ?

    /Jan

Please Sign in or register to post replies

Write your reply to:

Draft