New in Kaliko CMS 1.1.0

December 13, 2015 Kaliko CMS Open source

Among improvements and bug fixes there's a couple of new features in Kaliko CMS version 1.1.0.

New Composite Property Type

Previously creating new property types that combined other property types into one was a quite complex task since it also required an editor to be manually created that includes functionality for all those types that was included. To make this a lot easier a new composite property type has been added. When inheriting this property type you can build your custom property type using all availabe property types, combining for instance images with text and links, and the CMS will load the appropriate editor.

This is a sample that creates a new property type that has a heading, an HTML-block and a link. This is done by implementing properties using the property types StringProperty, HtmlProperty and LinkProperty:

namespace DemoSite.Business.PropertyTypes {
    using KalikoCMS.Attributes;
    using KalikoCMS.PropertyType;

    [PropertyType("9033A828-B49A-4A19-9C20-0F9BEBBD3273", "Feature", "Feature", EditorControl)]
    public class FeatureProperty : CompositeProperty {
        [Property("Header")]
        public StringProperty Header { get; set; }

        [Property("Feature body")]
        public HtmlProperty Description { get; set; }

        [Property("Featured link")]
        public LinkProperty Url { get; set; }

        // Override Preview with how to render items of this type in lists.
        // It's also possible to use more complex HTML-layout here if wanted.
        public override string Preview {
            get { return Header.Preview; }
        }
    }
}

All property type properties needs to be decorated using a PropertyAttribute in the same way as you do on page models.

No property editor needs to be created, just the property type and the CMS will handle the editor for you. The editor fields will be in the same order as they appear in your type, so if you want to reorder them just change the order of your properties.

Page preview

Working copies of pages as well as previously published pages can now be previewed.

Improvements

Bug fixes

Related posts: