Last active
February 28, 2019 13:55
-
-
Save simple17/d717937fa6367b95b876459fad5e6d38 to your computer and use it in GitHub Desktop.
[Common Model] Episerver common block data #episerver #c#
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.ComponentModel.DataAnnotations; | |
using EPiServer.Core; | |
using EPiServer.DataAbstraction; | |
using EPiServer.DataAnnotations; | |
using DigiOne.Core.DataAbstraction; | |
using DigiOne.Core.Styles; | |
using EPiServer; | |
namespace SomeName.Project.Areas.Layout.Models | |
{ | |
[ContentType(DisplayName = "Project block name", | |
GroupName = "SomeName Project", | |
Description = "Project block.", | |
GUID = "E007684C-DE84-4F7D-9BE7-2F786BB4A81F" | |
)] | |
[ImageUrl("~/modules/SomeName.Project/Client/Icons/page-type-thumbnail.png")] | |
public class ProjectBlockData : BlockData | |
{ | |
[CultureSpecific] | |
[Display( | |
Name = "Some", | |
Description = "Some desc", | |
GroupName = SystemTabNames.Content, | |
Order = 10)] | |
public virtual Url Some { get; set; } | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.ComponentModel.DataAnnotations; | |
using EPiServer.DataAbstraction; | |
using EPiServer.DataAnnotations; | |
namespace SomeName.Project.Areas.Layout.Models | |
{ | |
[ContentType( | |
DisplayName = "Project Red Text Block", | |
GroupName = "SomeName Project", | |
Description = "Text block with red background", | |
GUID = "EC2D89E2-CACE-4C87-96E7-CEB2E2B6DFEA" | |
)] | |
[ImageUrl("~/modules/SomeName.Project/Client/Icons/page-type-thumbnail.png")] | |
public class ProjectRedTextData : ProjectBaseBlock | |
{ | |
[CultureSpecific] | |
[Display( | |
Name = "Text", | |
Description = "Text in block", | |
GroupName = SystemTabNames.Content, | |
Order = 10 | |
)] | |
public virtual string Text { get; set; } | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment