In Page_Load of an EPiServer page, I am replacing some [[content]] with some data from a database using this code:
if (!PageEditing.PageIsInEditMode) { if (property.InnerProperty != null) { var prop = property.InnerProperty.CreateWritableClone(); string webFieldContent = contentData.GetWebFieldContent(propertyName); prop.Value = webFieldContent;
property.InnerProperty = prop; } }
This works fine on the page itself, but not on local blocks. When debugging, i can see the data replacement being done as expected, but hwen the page has loaded, the [[content]] has not been replaced after all. Does anyone have an idea why this happens - or even better - what I can do to make it work?
In Page_Load of an EPiServer page, I am replacing some [[content]] with some data from a database using this code:
if (!PageEditing.PageIsInEditMode)
{
if (property.InnerProperty != null)
{
var prop = property.InnerProperty.CreateWritableClone();
string webFieldContent = contentData.GetWebFieldContent(propertyName);
prop.Value = webFieldContent;
property.InnerProperty = prop;
}
}
This works fine on the page itself, but not on local blocks. When debugging, i can see the data replacement being done as expected, but hwen the page has loaded, the [[content]] has not been replaced after all. Does anyone have an idea why this happens - or even better - what I can do to make it work?