epi 9 - Display attribute in 'On-Page Editing' view

Dejan Caric
Member since: 2010
 

Hi,

I've decorated a page property with a Display attribute like this:

[Display(
    Name = "/propertynames/myproperty",
    GroupName = SystemTabNames.Content,
    Order = 310)]
public virtual XhtmlString MainBody { get; set; }

And created an XML under Resources / LanguageFiles:



  
    
      
        My Property
      
    
  

When I'm editing the page in All Properties view, I get My Property, as expected:

But when I edit the page in On-Page Editing view, I get /propertynames/myproperty:

Tested with Alloy.

EPiServer 9.12.0.0

EPiServer.UI 9.8.1.0

#151465
Jul 22, 2016 19:46
Alf Nilsson
Member since: 2008
 

Normally you don't need to define your name with an xpath like that.

Have a look at http://world.episerver.com/blogs/Linus-Ekstrom/Dates/2013/12/New-standardized-format-for-content-type-localizations/ and it might help you.

#151466
Jul 22, 2016 19:53
Dejan Caric
Member since: 2010
 

Yes, that's what I normally do. But I also wanted to check if I can define a name with an XPath and noticed that it doesn't work in On-Page Editing view.

#151467
Jul 22, 2016 20:00