Hi,
I'm new to Umbraco. How would you implement custom page that represents Member Profile (personal), but also can be accessible by Admin with some additional "edit" buttons? Also some data from this page should be loaded from different database.
I may implement my own API for data load/update, but I have no idea how to implement profile page in the right way.
Sounds like you want a SurfaceController. The Index action method would be the "get" data. You'd create a helper utility class / service that would do the logic of getting the data (supplementing the Umbraco member with your db data).
Create a model with your required member properties (possibly inheriting from the Umbraco member).
Have a look at https://github.com/cheeseytoastie/UmbMembersFullTutorial
as a starter. It's a bit long in the tooth now but does have a basic surfacecontroller that loads the member's details and submits edits. Might be a handy start.
For the admin you'll probably need a separate page (to list and query all members) but you'll be able to reuse your methods in your helper service if you do it right.
Custom member profile page with external data
Hi, I'm new to Umbraco. How would you implement custom page that represents Member Profile (personal), but also can be accessible by Admin with some additional "edit" buttons? Also some data from this page should be loaded from different database.
I may implement my own API for data load/update, but I have no idea how to implement profile page in the right way.
Thanks in advance
Hi Kostya,
Sounds like you want a SurfaceController. The Index action method would be the "get" data. You'd create a helper utility class / service that would do the logic of getting the data (supplementing the Umbraco member with your db data).
Create a model with your required member properties (possibly inheriting from the Umbraco member).
Have a look at https://github.com/cheeseytoastie/UmbMembersFullTutorial as a starter. It's a bit long in the tooth now but does have a basic surfacecontroller that loads the member's details and submits edits. Might be a handy start.
For the admin you'll probably need a separate page (to list and query all members) but you'll be able to reuse your methods in your helper service if you do it right.
Steve
is working on a reply...