November Happy Hour will be moved to Thursday December 5th.

Need to customize the block data showing in Homepage for each user.

Vote:
 

Hello,

I have a requirement to customize the block data showing in Homepage for each user.

Means user can select which block they need to see in next login. 

can we use profile store for saving the custom data for each user ?

If profile store is not the right solution then how can we achieve this in episerver.

If any one have any idea please share as i am new in EpiServer.

#258863
Jul 13, 2021 17:43
Vote:
 

Personally I don't see this as a great use case for the profile store as it's for tracking user interaction rather than preferences.

This is something you'd normally store against the user profile or in a custom settings table associated to the user record. If you're using asp.net identity you can just create a custom user entity and store it against that very easily. That's how you'd normally store settings/preferences.

#258908
Jul 14, 2021 8:17
Sushant Chandan - Jul 14, 2021 11:46
Thanks for your prompt reply.
Can you please help me to use custom setting table for each user?
Scott Reed - Jul 14, 2021 11:50
What identity provider are you using? The standard asp.net identity?
Sushant Chandan - Jul 14, 2021 12:49
I am using a third party api for the authentication of website user.
Scott Reed - Jul 14, 2021 12:53
There's a users table, if you're using a third party I assume you're using OAuth to connect or SAML or something. The user's table should sync records with it so you can get the users ID from the accessing the Context or claims. Once you have the ID use EntityFramework (or whatever you want to use) to create a table with a key referencing the user's key, then just CRUD as you would with any DB operations.
Sushant Chandan - Jul 14, 2021 15:35
Thanks Scott for more information. Just want to know the following:
In episerver DB can we create a new table manually for our custom data ? I mean can we make tables from sql server designer, does it involves any problem for future when epi database update need to be done?

Scott Reed - Jul 14, 2021 15:39
The recommended way is to use EntityFramework as this is what the platform uses and migrations are set to automatically migrate the schema on deployment https://world.optimizely.com/documentation/developer-guides/digital-experience-platform/development-considerations/custom-database-tables/. If you're on the DXP you have to do it that way as you have no control over the DBs for Prep or Prod. If you're hosting outside of the DXP you could do them in SQL Designer and run SQL scripts yourself but that's not best practice but it's your choice
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.