Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding information text for a region #388

Closed
mfronczyk opened this issue Sep 24, 2018 · 1 comment
Closed

Adding information text for a region #388

mfronczyk opened this issue Sep 24, 2018 · 1 comment

Comments

@mfronczyk
Copy link

This refers to the comments in #355. This feature would be helpful to send content editors some instructions on how to edit the specific region, where it's used and so on.

@tidyui
Copy link
Member

tidyui commented Sep 24, 2018

Yes! This will be implemented for 5.2. It's already fully implemented in the labs manager, due for 6.0 release, but I will lift the features over to the current manager. Here's an example Page Type I'm using in the labs project.

/// <summary>
/// Test page
/// </summary>
[PageType(Title = "Test page")]
public class TestPage : Page<TestPage>
{
    public class HeaderRegion
    {
        [Field(Options = FieldOption.HalfWidth, Placeholder = "Mandatory title")]
        public StringField Title { get; set; }

        [Field(Title = "Sub title", Options = FieldOption.HalfWidth, Placeholder = "Optional sub title")]
        public StringField SubTitle { get; set; }

        [Field(Title = "Background image")]
        public ImageField Background { get; set; }

        [Field]
        public HtmlField Body { get; set; }
    }

    [Region(Position = RegionTypePosition.BeforeBody)]
    [RegionDescription("The Header shows an optional Hero banner on the page. If you leave all fields empty the header will be omitted from the current page.")]
    public HeaderRegion Header { get; set; }

    [Region(Title = "Test Region")]
    [RegionDescription("This is the same region as the header but unpinned.")]
    public HeaderRegion TestRegion { get; set; }
}

And this is how it gets rendered in that manager interface. As regions are presented slightly different in the current manager it won't look exactly like this, but it will be the same concept.

skarmavbild 2018-09-24 kl 12 51 52

Best regards

@tidyui tidyui added this to the Version 5.2 milestone Sep 24, 2018
@tidyui tidyui self-assigned this Sep 24, 2018
@tidyui tidyui closed this as completed in 4800f4a Oct 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants