Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4058842
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T15:07:51+00:00 2026-05-20T15:07:51+00:00

Working on N2 CMS I’m adding my own content type Product . I derive

  • 0

Working on N2 CMS I’m adding my own content type Product. I derive my Product class from ContentPageBase and I can add it in the content tree. When I edit an item however, the fields seem to be inverted (Title and Text). For all example items (e.g. News) Title always shows up at the top.

I understand there is a ContainerName property which can be set to a tabname, however I don’t see any property overrides for Title or Text in the News class, so how can this be?

Editing news item

Editing news item

Editing product

Editing product item

Product.cs (custom)

using N2;
using N2.Web;
using N2.Details;
using N2.Integrity;

namespace N2.Templates.Mvc.Models.Pages
{
  /// <summary>
  /// This class represents the data transfer object that encapsulates 
  /// the information used by the template.
  /// </summary>
  [PageDefinition("Product")]
  [WithEditableTitle, WithEditableName]
  [RestrictParents(typeof(ProductSection),typeof(ProductCategory))]
  public class Product : ContentPageBase
  {

  }
}

News.cs (default)

using System.Web.UI.WebControls;
using N2.Definitions;
using N2.Details;
using N2.Integrity;
using N2.Templates.Mvc.Services;
using N2.Web.Mvc;
using N2.Persistence;

namespace N2.Templates.Mvc.Models.Pages
{
    [PageDefinition("News", Description = "A news page.", SortOrder = 155,
        IconUrl = "~/Content/Img/newspaper.png")]
    [RestrictParents(typeof (NewsContainer))]
    public class News : ContentPageBase, ISyndicatable
    {
        public News()
        {
            Visible = false;
            Syndicate = true;
        }

        [EditableTextBox("Introduction", 90, ContainerName = Tabs.Content, TextMode = TextBoxMode.MultiLine, Rows = 4,
            Columns = 80)]
        public virtual string Introduction
        {
            get { return (string) (GetDetail("Introduction") ?? string.Empty); }
            set { SetDetail("Introduction", value, string.Empty); }
        }

        string ISyndicatable.Summary
        {
            get { return Introduction; }
        }

        [Persistable(PersistAs = PropertyPersistenceLocation.Detail)]
        public virtual bool Syndicate { get; set; }
    }
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T15:07:52+00:00Added an answer on May 20, 2026 at 3:07 pm

    The Title and Name editors aren’t set on the properties themselves but on the Class.

    See the WithEditableTitle and WithEditableName attributes on your class.

    And News class doesn’t have to specify them because it inherits from ContentPageBase instead of the root ContentItem class that your Product class is using. ContentPageBase has the Title and Name editors already specified so News doesn’t have to again.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working with a CMS, Joomla, and there's a core class which renders a
I'm working on a custom CMS for my own use and was thinking about
I a working on a CMS and I want to be able to add
I'm working with a CMS which allows you to develop your own custom controls
Got myself in a bit of a pickle here ... working on a CMS
I'm working on a module for a CMS. This module is distributed as a
I'm working on a PHP CMS like project and I'm trying to find out
im working with a cms made a few years ago in asp/vbscript (old asp)
I am working on a CMS using CakePHP and I want to create a
I am working with SiteFinity CMS. My particular layout is 3-column with 100% width

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.