We are trying to add some functionality to our exsisting website. In this regard we need a local block on every page. I have created a block and have added it as property on PageBase class, this is the class which is inherited by every page.
The problem i am having is how to render this block on every page without using @Html.PropertyFor(), on every page view.
public abstract class PageDataBase : PageData
{
[Display(
Name = "Test blok",
Description = "",
GroupName = PropertyGroupNames.xxx,
Order = 1)]
public virtual TestBlock TestBlock { get; set; }
//
//
}
How to render TestBlock on everypage without adding
@Html.PropertyFor(m=> m.CurrentPage.TestBlock) on every view of page