Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
AI OnAI Off
Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
you could try to have a uiHint on hat property and then create a display template for it. Then you can render it based on that.
if you only want that visible on ediitng, you can put PageEditing.PageIsInEditMode as well and then display a different view when rendered outside of edit mode.
[UIHint("PageHeader")]
public virrtual basepageseettingsblock basepagesettings{get;set;}
then you create a PageHeader.cshtml file in display templates. I am not sure if it will work but worth a shot. Let me kow how it goes.
I would certainly expect this sub property to be editable just as any other field. I'll do an investigation to see if this is a bug/glitch...
Hi,
Is it possible to have only one editable field from the block on the page. What I mean:
I have a block with a field:
[Display(Name = "Page header", Description = "Page Header", GroupName = Global.GroupNames.Labels, Order = 10)]
public virtual String PageHeader { get; set; }
This block is present as a property in a page data class:
public virtual BasePageSettingsBlock BasePageSettings{ get; set; } << this block contains PageHeader property.
In a view I want this field to be editable, so I write a PropertyFor for the field PageHeader:
@Html.PropertyFor(x => x.CurrentPage.BasePageSettings.PageHeader)
but it doesn't editable in edit mode. It is editable prperties view, or if I write PropertyFor for the whole block. Is it possible to have only this field editable in edit mode?