I'm looking to open a content picker
# package-development
d
I'm looking to open a content picker window in Umbraco 14, but can't quite find out how to do this. It should simply show the content tree, just like the content picker property editor. I want the user to pick a content page from the content section. Has anyone already done this before and can give me a pointer?
Ok, I just discovered
UMB_DOCUMENT_PICKER_MODAL
. I think that's it, but I still have 60 build errors to work through before I can find out for sure 😅
w
Yep modalManager was what I was gonna suggest
Good luck, have fun
n
Hot tip - for modals there's usually not need to consume the manager context, instead grab it using
await this.getContext()
. Saves a bit of code with setting up observers and such
d
Thanks for the tip!
b
and what would i use to open up Media Picker window?
d
My educated guess would be
UMB_MEDIA_PICKER_MODAL
, but I haven't verified
b
anddd, for Multi url picker?/ , thanks
d
I don't know, but I think you might be able to find this one by simply opening the backoffice and checking the extension menu in settings
w
Completions with VSCode are pretty good so just find the CONST that sounds the right one
18 Views