CommonPart confusion..

Topics: Writing modules
Sep 12, 2012 at 1:47 PM

I have a content Part that when Rendered always shows the "Owner" field..I'm not sure how I get rid of it....

image

My table for the Facebook notices settings is a ContentPartRecord which I had thought was necessary

SchemaBuilder.CreateTable(typeof(FacebookNoticesPageSettingsRecord).Name, 
table => table
.ContentPartRecord()
.Column(
"FacebookPageOrUserName", DbType.String)

Which is tied to a parent record

 

public FacebookNoticesPageSettingsHandler(IRepository<FacebookNoticesPageSettingsRecord> repository)
        {
            Filters.Add(new ActivatingFilter<FacebookNoticesPageSettings>("SchoolSettings"));
            Filters.Add(StorageFilter.For(repository));
        }

 

That look like this 

 

SchemaBuilder.CreateTable(typeof(SchoolInfoLookup).Name,
                table => table.
	    .Column("Id", DbType.String, column => column.WithLength(40).PrimaryKey())
            .Column("StoredOn", DbType.DateTime)
            .Column("LabelInternal", DbType.String)
            .Column("LabelExternal", DbType.String)
            .Column("LEAInfoRefId", DbType.Guid);
                );

 

the SchoolInfoLookup records are populated by another system so the User never enters this information 

The FacebookNoticesPageSettingsRecord is tied to the SchoolInfoLookup and we want the school administrators to be able to populate the Facebook settings but at the moment the Owner always shows up. 

I want to be able to add new content to the SchoolInfoLookup record using the same technique and rendered in a generic way. They are rendered using this commend in the SchoolInfoLookup controller

image

Any help would be appreciated.

Thanks

 

Coordinator
Sep 12, 2012 at 4:57 PM

The owner is part of the common part, which can be configured from the content type editor. You just need to uncheck a checkbox, and save. I'm not sure what the rest of your post has to do with your original question.