I've created a couple of custom regions within my Piranha CMS Installation but am having problems when I have any kind of text region within my custom region. The Editor will display and you can enter text but it doesn't save to the DB.
Here's my classes
using System;
using System.ComponentModel.Composition;
using Piranha.Extend;
using Piranha.Extend.Regions;
namespace MatchtechGroup.Models.Regions
{
[Export(typeof(IExtension))]
[ExportMetadata("InternalId", "SimpleTab")]
[ExportMetadata("Name", "Simple Tab")]
[ExportMetadata("Type", ExtensionType.Region)]
[Serializable]
public class SimpleTab : Extension, ITab
{
public string Title { get; set; }
public HtmlRegion Tab { get; set; }
public SimpleTab()
{
Tab = new HtmlRegion();
}
}
}
And my Manager template in Areas/Manager/Views/Extensions
@model MatchtechGroup.Models.Regions.SimpleTab
@{
Layout = "";
}
<ul class="form">
<li>
@Html.LabelFor(m => m.Title)
<div class="input">@Html.TextBoxFor(m => m.Title)</div>
</li>
<li>
@Html.TextAreaFor(m => m.Tab, new { @class = "editor", @rows = 10 })
</li>
</ul>
The manager interface renders my new region correctly in the page editor but will not save content from the Html Region. There are no errors displayed in the interface, I just don't get the 'This Page has saved' message bar appear or am I able to publish the page.
Any help would be much appreciated, feels like I'm missing something basic or just that I can't nest an HTML region within this custom region.
Thanks