I am very impressed with n2 cms and have just about got it working on my first website. I would now like to add an additional 5 template pages - all with unique html/image content. I copy the PageItem.vb file to "Page1Item.vb",
and rename it's class to "Page1Item", instead of "PageItem". I then copy default.aspx to default_2.aspx, and update the code behind to it makes reference to "Page1Item". I then get the following error:
Object with id: 2 was not of the specified sublcass: N2.ContentItem (Discriminator was: 'PageItem')
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: NHibernate.WrongClassException: Object with id: 2 was not of the specified sublcass: N2.ContentItem (Discriminator was: 'PageItem')
Line 36: <div>
Line 37: <!-- This is a way to inject data into a webforms control, in this case we're injecting the current page's text property -->
Line 38: <asp:Literal ID="TextLiteral" Text="<%$ CurrentPage: Text %>" runat="server" />
Line 39: </div>
Line 40: </td>
I saw the C# example where you can specify the TemplateUrl. How can I do this in VB.NET?
<Definition("My First Page")> _
Public Class MyPagePage
Public Overloads Overrides ReadOnly Property TemplateUrl() As String
It is saying that N2.Templates.Items.AbstractContentPage is invalid.
Can anyone give me an example of a template and code in VB.NET, please?