Hi Sandeep,
From what I could understand in Second block you want to show MarketBlock? If that is a case in Second block you need "ContentArea" as below:
public virtual ContentArea Market {get;set;}
And admin can drag and drop an instance of the Market block into that Second block content area you created. Other, way is to have Market block property as below:
public virtual Market Market {get;set;}
That means per each Second block instance you will have an instance of Marke means you can't re-use.
Aria
if(currentBlock.BlockContentArea != null && currentBlock.BlockContentArea.Items.Any())
{
foreach (var contentItem in currentBlock.BlockContentArea.Items)
{
var contentLoader = ServiceLocator.Current.GetInstance<IContentLoader>();
var contentOfBlock = contentLoader.Get<IContentData>(contentItem.ContentLink)
}
}
hi here what is BlockContentArea, and how to declare it. could u provide sample code snippet,
how can i get perticular block type data( my requirement is market).
thnaks in advance
Hi all,
I have a block with name market.
i have another block ads, in that block i want to display market block data.
so how can i achive this using c# backend code not browser.