Vulnerability in EPiServer.Forms
I’d like to connect 2 different block types on a page and am unsure of how to go about this.
I have a ContentArea TeamArea which holds TeamBlocks and a ContentArea ProfilesArea below this which holds ProfileBlocks. TeamBlock consists of a String TeamName, XhtmlString Description and a ContentArea TeamPhoto. The ProfileBlock has a String ProfileName, XhtmlString Biog, ContentArea Photo.
I’d like the TeamBlocks to be clickable showing the profiles of members of that team in the ProfilesArea. I understand it could be set up with multiple pages but as the team numbers grow this could lead to numerous pages all set up similarly. I think the 3 stages I need are:
Am I going about this the right way? Any examples of something similar being down would be appreciated.
Thanks in advance,
If one player can only belong to one team I would store the team as pages (not blocks) in page tree and then the profiles below that. Then you get that relation for free since you have the parent child relation. That takes care of data modelling part. For presentation I would probably let editors drag n drop the team and profile pages instead and do some partial views for them to display in content area.
For many to many relationships it gets trickier. I would probably store that either in dds or using EF and have a custom property to select teams a player belong to.
Thanks for your response Daniel, I’m going with your recommendation.
I came across another post with someone working with a similar issue and the response was to do as you’ve suggested. My only issue with it is that it seems inefficient? For years we’ve been working towards separating content from design/layout and pulling database content into a single page programmatically. With EPiServer it feels like I’m back to creating multiple pages and subpages. I do see the benefits for the Editor – the edit side of the CMS is almost identical to the visitor’s view so information is logically easier to find.
Each person is a member of one team so I’ve no need for many to many relationships for this project but will be looking at the DDS and EF for a future project. Thanks again.