Benjamin Howarth made one a while ago... on his project page. Its says that it's compatible with v4.0 - so not sure if that means it's compatible with v4.5+
Otherwise, roll your own and release the package? Woo!
Do you mean a picker like a Content Picker or Media Picker where the tree pops up and your able to navigate the structure to find the one you want?
If you do then thats more complicated but would be very nice!
I have recently made a datatype that asks for a Document Type and I just use the method you mentioned, DocumentType.GetAllAsList() and use it as the datasource on a DropDownList then bind the Text and UniqueID.
If you want my code it's part of a bigger project but I can extract it for you just let me know.
Yes, I did start one of these a while back with 4.0 compatibility in mind, and for which I still have code booting around somewhere in the cobwebs of the Net :-) A document type provider for Universal Media Picker will be included with Blog4Umbraco v3 which is due for imminent release.
Joel, if you want to check out the code in the B4U source, it's in /branches/try-codegecko-features/umbraco.blog4/DataTypes/UMPDoctypeProvider.
@aghy - yeah i want to pick one or many from a list of available document types
@benjamin - so is the UMP provider model the recommended way to go with such developments? best practice and all that? thanks for the link, am all up in your codez right now!
I honestly don't know actually! I'm assuming single-item though, as I don't know what would be required to make it multi-item-capable (just rewalked my code). Better ask the karminator!
Document type picker datatype?
I'm asking if one of these exists somewhere already before I go and write one myself.
I want to select a document type(s) and store the document type id (alias might change).
Is a list of doctypes available using the API or do i need to go fiddling with the DB?
I could filter all the content on nodeType but that would be expensive and only give me the document types currently in use.
Thanks for the help.
I found this:
umbraco.cms.businesslogic.web.DocumentType.GetAllAsList()
i'm guessing that's the way to go if there's no document type picker datatype already.
Hi Joel,
Benjamin Howarth made one a while ago... on his project page. Its says that it's compatible with v4.0 - so not sure if that means it's compatible with v4.5+
Otherwise, roll your own and release the package? Woo!
Cheers, Lee.
thanks for the tip off. i'll have a look at that now and see if it does what i want, and also see how he's getting the data!
Hi,
Do you mean a picker like a Content Picker or Media Picker where the tree pops up and your able to navigate the structure to find the one you want?
If you do then thats more complicated but would be very nice!
I have recently made a datatype that asks for a Document Type and I just use the method you mentioned, DocumentType.GetAllAsList() and use it as the datasource on a DropDownList then bind the Text and UniqueID.
If you want my code it's part of a bigger project but I can extract it for you just let me know.
Ben
Hi all,
Yes, I did start one of these a while back with 4.0 compatibility in mind, and for which I still have code booting around somewhere in the cobwebs of the Net :-)
A document type provider for Universal Media Picker will be included with Blog4Umbraco v3 which is due for imminent release.
Joel, if you want to check out the code in the B4U source, it's in /branches/try-codegecko-features/umbraco.blog4/DataTypes/UMPDoctypeProvider.
HTH,
Benjamin
thanks guys
@aghy - yeah i want to pick one or many from a list of available document types
@benjamin - so is the UMP provider model the recommended way to go with such developments? best practice and all that? thanks for the link, am all up in your codez right now!
@Joel IMO, yes, UMP is definitely the best way to go with hierarchical data in my view. Glad to be of help :-)
Thanks. Got it up and running.
Would I be right in thinking that you can only pick a single item and not multiple with UMP or is that just your specific implementation in this case?
I honestly don't know actually! I'm assuming single-item though, as I don't know what would be required to make it multi-item-capable (just rewalked my code). Better ask the karminator!
the karminator confirms UMP does not support multiple selections
thanks to inspiration from benjamin and a kick up the ass from lee, have rolled own which allows selection of multiple doctypes.
find here: http://our.umbraco.org/projects/backoffice-extensions/document-type-picker
is working on a reply...