Dynamic Contentblock types. Before we get to those, lets talk about some commands that are available to all blocks.
RockBlockbecause we have to initialize the entire page and ASP.NET stack to do it properly. For these reasons, a new base block type was created:
IRockBlockType. This interface provides the minimal required bits and pieces in order to have a block exist in the system. There is also a base class that provides a a number of helper methods for your blocks:
IRockBlockTypecan be used for mobile applications:
IRockMobileBlockType. This defines a few properties and methods that must exist for a block to be able to provide the required information to a mobile application:
RockCustomSettingsUserControlProvider. The former allows you to build the UI in pure C# while the latter uses an
ascxuser control to build the UI. Whichever class you inherit from, you would then add a
[TargetType( typeof( nnn ) )]decorator on your subclass. This
TargetTypeidentifies the class type that it targets. In other words, the block type class you are building a custom settings UI for.
Basic Settingstab would normally be empty, you can define the title of your custom settings tab to be
Basic Settingsand it will put placed in the
Basic Settingstab rather than a new tab.
DateTimeOffset.Dateproperty. If you just use a DateTime object then it will be converted to local time zone and you won't know what the original value was.