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.
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.
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.
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
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
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
so is this a possible limitation of umbraco? to create a 'complex' datatype that includes several fields.
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
Yes i was thinking the same thing. thanks
is working on a reply...
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.