sachatrauwaen / OpenContent-Templates

Templates for OpenContent
MIT License
7 stars 4 forks source link

Add Photo management to UserManagement Template #13

Open Timo-Breumelhof opened 3 years ago

Timo-Breumelhof commented 3 years ago

ATM, you cannot use a Photo field

fowarallc commented 4 months ago

Is there a plan to implement this?

Timo-Breumelhof commented 4 months ago

When you use the new V2 vue builder / editor, (see global settings) you can use this. Please also read this:

https://opencontent.readme.io/edit/migrating-existing-templates-to-builder-v2

The "problem" is that the image editor needs to pass the imageid to DNN after saving, the new Imagebrowser field does not support that. For this use case Sacha added the imageidbrowser field which is hidden by default.

You need to add an edit.js field to your template folder containing this:

// For image browser window.Lama.registerFieldComponent("imageidbrowser", window.Lama.components.ImageIdBrowserField);

And from that moment on ist should show up in the builder can be used for portal images.. Please note that you cannot add an image when you create a user as the image needs to be written to the user folder, which does not exist t that point in time. So that would be step 2

Timo-Breumelhof commented 4 months ago

I will convert the the template to a V2 builder template, but I'm not sure when yet..