How can i use checkboxes for each of the link added from cms backend and one button too that will save the selection which is selected by site user.

Vote:
 

I have a EPI cms website where on home page there is a quick link section.

Here we are showing all of the links which are added from the cms end in content area.

How we can put the checkbox for each of the links and one button too which will save/update the selected/unselected links data from home page by each users.

Users can decide which links will display next time when they will login again.

Please help me as i am new in EpiServer.

#261002
Aug 23, 2021 17:31
Vote:
 

There's no simple out of the box solution for this. What I would do is use EntityFramework to create a table mapping between the IDs of the checkbox items and the user ID of a logged in user. Then build your logic to create some JS sending to an API controller when a user checks the box to then save this data to the database therefore preserving. All requires some custom implementation that's just standard ASP.NET, therefore no in build solution for tieing Optimizely CMS content to user preferences.

#261046
Aug 24, 2021 9:14
Vote:
 

Scott, interested to hear your perspective on using Entity Framework for persistance as opposed to DDS in this scenario?

#261050
Aug 24, 2021 10:33
Scott Reed - Aug 24, 2021 10:35
my opinion is to never use the DDS for anything lol. The DDS has known issues which I've come up against due to performance which can sometimes cause DDS queries to time out and as the DDS has every different type in it before you know it it's unmanageable. If you use entity framework you can do code first with migrations that are auto deployed as you deploy to each environment and you can handle the design and performance optimization yourself. After being bitten with the DDS I would never use it again if ever possible
Johnny Mullaney - Aug 24, 2021 11:04
Agreed. I too got bitten a few years back so have steered clear. It's good to know I'm not alone! :)
Mark Stott - Aug 25, 2021 10:19
DDS can be useful, but it's also a very bloated table with a lot of columns to suit a variety of use cases and a single source of data for a lot of uses. In other words, it is not optimized for your use case and should be avoided if you want to access anything in a performant manner. If you have a well defined use case like the above, it will always be better and more performant to design your own tables and indexing. The fact you can use EF migrations makes this easy to deploy into DXP.
* 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.