In PiranhaCMS i want to create custom page types that will store my data about Events. I created the type and added fields, but i cant see the editor for my new fields in CMS.
I am expecting to see the field in this setting. Setting screenshot
[PageType(Title = "Home page")]
[ContentTypeRoute(Title = "Default", Route = "/homepage")]
public class HomePage : Page<HomePage>
{
[Field]
public string EventName { get; set; }
[Field]
public StringField EventTitle { get; set; }
}
My interpretation of documentation is that this should work and I should see my fields, did I get that wrong or is there a different problem?
Thank you
I tried different fields like only string and only StringField/TextField. Even tried the region.
In PiranhaCMS i want to create custom page types that will store my data about Events. I created the type and added fields, but i cant see the editor for my new fields in CMS.
I am expecting to see the field in this setting. Setting screenshot
[PageType(Title = "Home page")]
[ContentTypeRoute(Title = "Default", Route = "/homepage")]
public class HomePage : Page<HomePage>
{
[Field]
public string EventName { get; set; }
[Field]
public StringField EventTitle { get; set; }
}
My interpretation of documentation is that this should work and I should see my fields, did I get that wrong or is there a different problem?
Thank you
I tried different fields like only string and only StringField/TextField. Even tried the region.
I followed the instructions of SelArom Dot Net Tutorial - Customizing the Model with Regions and Fields and found out that I need to use new region to add fields or specify custom region attribute above custom field.
public class HomePage : Page<HomePage>
{
[Region(Title = "General", Icon = "fas fa-pen")]
public GeneralHomePageRegion General { get; set; }
}
public class GeneralHomePageRegion
{
[Field(Title = "Caption", Description = "Max 50 characters")]
public StringField Title { get; set; }
}