Try our conversational search powered by Generative AI!

Class inside Page Type

Vote:
 

Hello,

I would like to know if it's considered as a normal practise to include a Class under the Page Type, since that Class is closely related to a Page Type.

Something like:

public class SomePage : PageData 
{

    ... some page properties...

    public class RelatedToSomePageClass 
    {
        public string Title { get; set; }

        public XhtmlString Content { get; set; }
    }
}


Thanks!

#228912
Edited, Oct 05, 2020 13:28
Vote:
 

I have seen some developers that do this, but I would not consider this normal practise.

#228913
Oct 05, 2020 13:47
Vote:
 

I tend to see this kind of thing more often around the PropertyList feature.

#228917
Oct 05, 2020 15:27
Vote:
 

Most best practicate is to never have multiple classes in the same file. So I would split this out 

#228968
Edited, Oct 06, 2020 7:48
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.