tags:

views:

130

answers:

1

Hello,

Anyone familier with N2 CMS ??

ive just started using it, and so far so good, but i have an issue that im sure you guys will know whats wrong.

i have this simple Item class...

using N2;
using N2.Details;
using sexy_uk_escorts_MainSite.ContentCMSItems;

[PageDefinition("Home page", Description = "The Page for the home page, feature calvins text and other areas")]
[WithEditableName]
public class PageItem : AbstractBaseClass
{
/// <summary>
/// There are code snippets to help generate these properties.
/// Look in the snippets directory of the package.
/// </summary>
[EditableFreeTextArea("MainText", 97)]
public virtual string MainText
{
    get { return (string)GetDetail("MainText"); }
    set { SetDetail("MainText", value); }
}

/// <summary>
/// There are code snippets to help generate these properties.
/// Look in the snippets directory of the package.
/// </summary>
[EditableFreeTextArea("Calvin Text", 98)]
public virtual string CalvinText
{
    get { return (string)GetDetail("Calvin Text"); }
    set { SetDetail("Calvin Text", value); }
}

[EditableUrl("Calvin Image", 99)]
public virtual string CalvinImage
{
    get { return (string)(GetDetail("Calvin Image") ?? string.Empty); }
    set { SetDetail("Calvin Image", value, string.Empty); }
}

    [EditableFreeTextArea("Home Page Fotter Text", 100)]
    public virtual string FooterText
    {
        get { return (string)GetDetail("Home Page Fotter Text"); }
        set { SetDetail("Home Page Fotter Text", value); }
    }
}

In edit mode, N2 CMS picks it up and i can create a page and fill in all the data.

Once this is done i expect to see it in the tree, below my start page, but it never shows.

All the data is in the database but not in the tree, so once its created i cannot edit it :(

can anyone suggest what im doing wrong ??

thanks for your time

Truegilly

+2  A: 

Found the problem, as i copied the AbstractBaseClass which it inherits, from the N2CMS MVC example project, it contained methods that caused this problem. After removing these it now shows in the tree.

Truegilly

Truegilly