【问题标题】:N2 CMS - My Items dont show in the treeN2 CMS - 我的项目不显示在树中
【发布时间】:2010-03-13 23:05:30
【问题描述】:

任何熟悉 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 会选择它,我可以创建一个页面并填写所有数据。

一旦完成,我希望在树中看到它,在我的起始页下方,但它永远不会显示。

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

谁能建议我做错了什么??

感谢您的宝贵时间

真吉利

【问题讨论】:

  • 第三个 using 语句 - 出于示例代码的目的,我可能自己更改了它!

标签: content-management-system n2


【解决方案1】:

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

真吉利

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2016-01-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多