N2 CMS - 我的项目不在树中显示

时间:2010-03-13 23:05:30

标签: content-management-system n2

任何有家庭经验的N2 CMS?

我刚开始使用它,到目前为止一直很好,但我有一个问题,我相信你们会知道什么是错的。

我有这个简单的Item类......

using N2;
using N2.Details;
using MVCSite.ContentCMSItems;

[PageDefinition("Home page", Description = "The Page for the home page")]
[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); }
}

    [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); }
    }
}

在编辑模式下,N2 CMS选择它,我可以创建一个页面并填写所有数据。

一旦完成,我希望在我的起始页下面的树中看到它,但它从未显示过。

所有数据都在数据库中,但不在树中,因此一旦创建,我就无法编辑它:(

任何人都可以建议我做错了吗?

感谢您的时间

Truegilly

1 个答案:

答案 0 :(得分:2)

发现问题,因为我从N2CMS MVC示例项目中复制了它继承的AbstractBaseClass,它包含导致此问题的方法。删除后,它现在显示在树中。

Truegilly

相关问题