November Happy Hour will be moved to Thursday December 5th.
AI OnAI Off
November Happy Hour will be moved to Thursday December 5th.
Hi Jason,
It's using the string value, so you could update it to:
[GroupDefinitions]
public static class ContentGroupNames
{
[Display(Order = 70)]
public const string CustomPages = "Custom Pages";
}
and it will work.
Or, if you need localization, then add the following to the language XMLs:
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<languages>
<language name="English" id="en">
<groups>
<custompages>Custom Pages</custompages>
</groups>
</language>
</languages>
So am I forced to use the constant value as the display value? Is the Display attribute ignored all together?
Hi again,
No—you're not actually forced to use the string value, ideally you'd use the XML approach. That's the Episerver reccomendation as per the documentation (see 'Localizing headers'):
After a quick peek in the code I can't see that it ever uses the DisplayAttribute
Name when using group definitions, but maybe I'm missing something.
I created a custom group name that I wanted some of my page types to be listed under when creating new instances. This seems to work great when the name of the group is only a single word, but friendly names with spaces are ignored. Here is an example of my group definition:
At run time the name of the group shows the constant name "CustomPages", rather than the friendly name with the space from the Display attribute. These work just fine for tabs within content, but not for page or block group names.