Hi,
I'm trying to create a simple dummy content module for DW 10. I've placed the dll in the Files > System > AddIns and installed it afterwards. I also registered it under the Settings > Developer > Modules and checked "Paragraph module". The problem is, that the module does not show up, when I want to attach it to a paragraph.
My App inherits from ContentModule and I override the GetModuleContent() and return a "ContentOutputResult" where I've set the Model to a TestModel just containing a Headline and a BodyText. I might be missing something obvious as it's been a very long time since I've developed custom AddIns/Modules for DW :-)
My code is as simple as this:
using Dynamicweb.Extensibility.AddIns;
using Dynamicweb.Frontend;
using Dynamicweb.Modules;
using Dynamicweb.Rendering;
namespace Addins.TestApp
{
[AddInName("TestApp")]
[AddInActive(true)]
[AddInAuthor("Rene Poulsen")]
[AddInDescription("Just an app for testing a custom developed app for Dynamicweb 10")]
public class TestApp : ContentModule
{
public override OutputResult GetModuleContent()
{
ContentOutputResult<TestModel>? outputResult = base.GetModuleContent() as ContentOutputResult<TestModel>;
var testModel = new TestModel();
testModel.Header = "Headline test...";
testModel.BodyText = "Body text test...";
outputResult.Model = testModel;
return outputResult;
}
}
public class TestModel : ViewModelBase
{
public string? Header { get; set; }
public string? BodyText { get; set; }
}
}