London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!
AI OnAI Off
London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!
I have just found one possibility to deal with it:
var list = new List<MyBlock>();
foreach (var filteredContent in filteredContents)
{
var myBlock = filteredContent as MyBlock;
if (myBlock != null)
{
list.Add(myBlock);
}
}
The EpiServer internally uses a lot of proxies for Blocks and Pages.
In the ContentArea I placed MyBlock. I would like to get blocks from code. I filter them like:
but I always get empty list cause currentPage.MyContentArea.FilteredContents is collection of {Castle.Proxies.MyBlockProxy}
How to solve it?