Copied to clipboard

Flag this post as spam?

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


  • seanrock 158 posts 337 karma points
    Jun 05, 2009 @ 23:06
    seanrock
    0

    custom data types

    Hello

    i'd like to know if the following is possible.

    I want to create a datatype that represents a 'banner' on a page. The banner includes an image as well as a name and a url to go to when the image is clicked. I want to group the properties to make it simple for the content editors to update these.

    I've had a look at the custom data type tutorial here http://www.nibble.be/?p=50 however i didn't have much luck. i created the custom control and added some public properties that represented the various properties to be set on the content page such as name, url and image file. i added this to the document type but on the content page the the tab i added my custom data type to is empty except for the name i gave it and the description. none of the properties are visible. i've ensured that the parameters tab of the macro editor correct lists the properties i've added.

    Thanks
    Sean

  • Ulrik Knudsen 14 posts 25 karma points
    Jun 06, 2009 @ 00:41
    Ulrik Knudsen
    0

    Hi Sean

    Everything is possible ;-) another approach could be:

    Group the properties for the 'banner' in a document type.

    Create a 'banner folder' in the content tree where the banner documents are stored. Hide this from navigation, it's only for data storage.

    Create a datatype using the built-in Ultimate Picker datatype. Use the 'banner folder' id as parent node id.

    This makes it possible for the editor to select a 'banner' from the folder.

    To get the selected 'banner' node use something like:

    [code]
    [/code]

    I hope this makes sense.

    Best regards
    Ulrik

  • seanrock 158 posts 337 karma points
    Jun 06, 2009 @ 09:02
    seanrock
    0


    Hi Ulrik and thanks for your response. This is probably beyond my current knowledge of umbraco (i've only started using it a few days now) but i will try and see if i can accomplish this.



    Thanks
    Sean

  • seanrock 158 posts 337 karma points
    Jun 09, 2009 @ 17:05
    seanrock
    0


    so is this a possible limitation of umbraco? to create a 'complex' datatype that includes several fields.

  • Peter Dijksterhuis 1442 posts 1722 karma points
    Jun 09, 2009 @ 17:19
    Peter Dijksterhuis
    0

    Hi,

    I'm not sure a custom datatype is the best approach here. It takes some time to develop and test a datatype. (I know because the calendar I made basically IS a custom datatype)

    Quickest way to achieve what you want is to add an extra tab to the document-type and then add the 3 properties on that tab.
    At least, this would be the way I would do it.

    HTH,
    PeterD

  • seanrock 158 posts 337 karma points
    Jun 09, 2009 @ 17:35
    seanrock
    0

    Yes i was thinking the same thing. 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