Home
Knowledge Base
Documentation
Cartella
Developing Cartella
Custom Objects
Adding Fields to Custom Objects
Adding Fields to Custom Objects
How to Add Fields to Custom Objects | Edit custom objects to add new fields after their generation and setup.
You can modify custom objects after implementation by completing each of the
following procedures:
- Add fields to the new object within the Cartella UI.
- Edit form definition fields within Microsoft SQL Server Management Studio (SSMS).
- Update [Site_Root]\App_Code\[Custom_Object_Name].cs.
Warning: Do not edit the SQL scripts that were generated by Object
Builder, as this may render your Cartella site inoperable.
Adding Fields in UI
To add fields to the new object in the Cartella UI:
- Log in to Cartella.
- Navigate to Settings > Customize > Manage Fields.
- Select the custom object from the Field Management drop-down list.
- Click Add Fields.
-
At the bottom of the Fields list, enter values for
Name, Unique ID, and
Field Type.
- If the new field is required, enable the Required option.
- Click Save.
Editing Form Definition Fields in SSMS
To edit form definition fields:
- Open the Cartella database in Microsoft SQL Server Management Studio (SSMS).
- In SSMS, navigate to the dbo.Table_EditFormDefinition_Fields table within your Cartella database.
- Right click the dbo.Table_EditFormDefinition_Fields table, then select Edit Top 200 Rows.
-
Scroll to the end of the table and provide values for the new field,
manually.
- Close SSMS.
Updating Custom Object Controller in App_Code
To update the object's controller:
- Navigate to [Site_Root]\App_Code.
- Open [Custom_Object_Name].cs in Visual Studio or other ASP.NET editor.
-
In the custom object's controller, update the code to include the new
property.
In CustomModule1.cs, each code block needing an update is called out in a comment, where Field2 is the new property.
namespace Cartella.Classes { using System; using Cartella.Interfaces; using Cartella.Support; using System.Data.SqlClient; using System.Collections.Generic; using System.Linq; public partial class CustomModule1 : Cartella.Classes.FolioItemBase, ICustomModule1 { public CustomModule1() { } public CustomModule1(Cartella.Interfaces.IFieldCollection fields) : base(fields) { } public override System.Type[] AllowedChildrenTypes { get { return new Type[0]; } } public string Field1 { get { return this["EX_Field1"]; } set { this["EX_Field1"] = value; } } //------------------------------------------------------------------------------ // Add new property here: //------------------------------------------------------------------------------ public string Field2 { get { return this["EX_Field2"]; } set { this["EX_Field2"] = value; } } private string GetFriendlyName() { return "Custom Module 1 "; } } public class CustomModule1Manager : FolioItemManager<CustomModule1>, ICustomModule1Manager { public CustomModule1Manager(Cartella.Interfaces.ISiteManager siteManager) : base(siteManager) { } public CustomModule1Manager() { } public new virtual ICustomModule1 Select(Cartella.Interfaces.IFieldCollection fields) { return base.Select(fields); } public new virtual ICustomModule1 Create(Cartella.Interfaces.IFieldCollection fields) { return base.Create(fields); } public new virtual ICustomModule1 SelectSingle(string id) { return base.SelectSingle(id); } //------------------------------------------------------------------------------ // Add new property here: // public ICustomModule1 CreateCustomModule1(string name, string description, string Field1, Cartella.Interfaces.IEntity parentEntity) { //------------------------------------------------------------------------------ public ICustomModule1 CreateCustomModule1(string name, string description, string Field1,string Field2, Cartella.Interfaces.IEntity parentEntity) { FieldCollection fields = new FieldCollection(); fields.Add(new Field(new FieldDefinition("Name"), name)); fields.Add(new Field(new FieldDefinition("Description"), description)); fields.Add(new Field(new FieldDefinition("EX_Field1"), Field1)); //------------------------------------------------------------------------------ // Add new property here: //------------------------------------------------------------------------------ fields.Add(new Field(new FieldDefinition("EX_Field2"), Field2)); CustomModule1 obj = base.CreateEntity(fields, parentEntity); return obj as ICustomModule1; } } public class CustomModule1Procedures : Cartella.Classes.FolioItemProcedures { public CustomModule1Procedures(Cartella.Classes.MSSQLUserSpecificDataProceduresBase procBase) : base(procBase) { } public override System.Type BaseObjectType { get { return TypeFinder.GetType("Cartella.Classes.CustomModule1"); } } } } namespace Cartella.Interfaces { using System; using Cartella.Classes; public interface ICustomModule1 : Cartella.Interfaces.IFolioItem { string Field1 { get; set; } //------------------------------------------------------------------------------ // Add new property here: //------------------------------------------------------------------------------ string Field2 { get; set; } } public interface ICustomModule1Manager : IFolioItemManager<CustomModule1> { //------------------------------------------------------------------------------ // Edit the following line to include the new property: // ICustomModule1 CreateCustomModule1(string name, string description, string Field1, Cartella.Interfaces.IEntity parentEntity); //------------------------------------------------------------------------------ ICustomModule1 CreateCustomModule1(string name, string description, string Field1, string Field2, Cartella.Interfaces.IEntity parentEntity); } }
- Save changes and exit editor.
- CMS Documentaton Home
-
CMS 10
-
Installation and Upgrades
- CMS 10.5 Installation and Upgrades
- CMS 10.0-10.3 Installation and Upgrades
- Getting Started
-
Authoring Basics
- Creating Pages with Visual Editing
- Checking Pages In or Out
- Saving Pages
- Deleting and Restoring Pages
- Marking Pages for Publish
- Unmarking Pages for Publish
- Publishing Content Within the Site Area
- Viewing Publishing Target Assignments
- Advancing Content Items in Workflow
- Previewing Pages
- Checking for Spelling
-
Completing Page Elements
- Text Elements
- Group Elements
- Asset Elements
- Link Elements
- LinkSet Elements
- Multi-Select Elements
- Components
- XHTML Editor
-
Editing Basics
- Assigning Pages and Assets
- Using In-Context Editing
- Using History
- Viewing and Setting Page Properties
- Managing Pages in Site Tree
- Renaming Pages
- Page Builder
- Using Search
- Categorizing Pages and Components
- Generating Content via Taxonomy Navs
- Managing Pages in Workflow
-
Assets Manager
- Creating Asset Folders
- Moving Assets
- Copying Assets
- Uploading Assets
- Uploading Zipped Assets
- Deleting Assets
- Assets Metadata
- Adding Assets to Workflow
- Removing Assets from Workflow
- Assets History
- Categorizing Assets
- Editing Assets
- Downloading Assets
- Filtering Assets
- Setting Properties on Assets
- Searching for Assets in the CMS
- Converting Unmanaged Assets
- Marking Assets for Publish
- Unmarking Assets for Publish
- Publishing Within the Assets Area
- Viewing Publishing Targets in Assets Tree
- Authentication and Authorization
-
Administration
- Find/Replace
-
Schema Designer
- Using Schema Designer
- Page Schemas
- Component Schemas
- Asset Schemas
- Additional Configurations on Schema Types
-
Schema Actions
- Uploading Schemas
- Copying Schemas
- Reverting to Previous Schema Versions
- Schema Synchronization
- Downloading Schemas
- Deleting Schemas
- Checking Schema Usage
- Blocking Group Schema Access
- Creating Favorite Element Groups in Schemas
- Adding Attributes to Top-level Schemas
- Adding Elements to Schemas
- Adding Attributes to Schema Elements
- Viewing Schemas as HTML
-
Schema Designer References
- Page and Component Elements
-
Element Attributes for Schemas
- Asset Element Attributes
- Checkbox Element Attributes
- Component Element Attributes
- Dropdown List Element Attributes
- Dynamic Execute Element Attributes
- Group Element Attributes
- Insert Element Attributes
- Link Element Attributes
- LinkSet Element Attributes
- List Element Attributes
- Local Date Element Attributes
- Local Time Elements Attributes
- Multi-Select Element Attributes
- Navigation Element Attributes
- Password Element Attributes
- Plain Text Element Attributes
- References Navigation Element Attributes
- Taxonomy Navigation Element Attributes
- XHTML Editor Element Attributes
- XML Element Attributes
- Asset Elements
- Asset Field Types
- Schema Attribute Synchronization
- Presentation Content Units
-
System Options
-
CMS Settings
- Site Tree Context Menu
- Assets Tree Context Menu
- In-Context Editing Configuration
- Taxonomy
- Permissioned Workflow
- Custom Tabs
-
XHTML Editor in Schema Designer
- Basic Settings
- XHTML Editor JSON Configuration
- XHTML Editor Plugin Configuration
- XHTML Editor Block Formats Selection
- XHTML Editor Fonts Selection
- XHTML Editor Font Sizes Selection
- XHTML Editor Table CSS Classes
- XHTML Editor Image CSS Classes
- XHTML Editor Link CSS Classes
- XHTML Editor Custom Content CSS Files
- List of XHTML Editor Controls
- Spell-Check Settings
- Publishing
- Archiving
- Versioning
- Application Name
- Auto-Save
- Reverse Proxy
- Site Properties
- WorldView Configuration
- Email Configuration
- CMS Logging
- Log File Size
- File Locations
- Time Zones
- DSS Settings
-
CMS Settings
- InSite Search Configuration
-
Users and User Groups
- Creating User Accounts
- Creating Groups
- Enabling Workflow Emails
- Importing Users and Groups from Active Directory
- Adding Users to Groups
- Assigning Groups to Users
- Deleting User Accounts
- Deleting Groups
- Resetting User Passwords
- Viewing Page Creation Rules Assigned to Groups
- Viewing Group Workflow Transitions
- Viewing Group Permissions on Content Items
- Viewing Group Content Assignments
- Exporting User and Group Data in Excel XML Format
- User Group Permissions Reference
- Page Creation Rules
- Workflows Designer
-
Publishing System Manager
- Publishing Targets
- Publishing Profiles
- User Agents and Sites
- Device Manager
- Publishing System References
- Redirects
- Publishing Monitor
- Taxonomy
- Reports
- Localization
- Maintenance
-
Special Topics for Administrators
- Setting up DSS with ASP.Net Views to Display Content
- Export Types
- Monitoring RavenDB via SNMP
- Command Line Options for Silent Install
- Installing UI Language Packs
- SFTP Access to Assets
-
Oxygen Desktop Plugin
- Installing Oxygen Desktop Plugin
- Using Oxygen Connector
- RavenDB Certificates
- Page Builder Prerequisites
- Schema Designer Prerequisites
- PCR Prerequisites
- Workflows Designer Prerequisites
- Publishing Prerequisites
- Taxonomy Prerequisites
- Translation Prerequisites
- DITA Processing Pipeline
- InSite Search
-
Custom Plug-in Applications
- Website Analytics
- Working with Site Migrator
-
Translation within Ingeniux CMS
- Translating Site Content with WorldView
- Ingeniux Translation Manager
- Localizing Ingeniux CMS UI
-
Development
- Development Life Cycle
- Extending Ingeniux CMS Functionality
-
Building an MVC Website for DSS
- Getting Started with ASP.NET MVC
- Opening the Sample DSS Preview Project
- Adding Views to Visual Studio Project
- Uploading MVC Views as Managed Assets
- Developing MVC Solution by Example
- Testing MVC Solution in Preview Tab
- Deploying MVC Instance to DSS
- Working with the DSS API
- Special Topics for Developers
- Typographic Conventions
-
Installation and Upgrades
-
CMS 9
- Installation
- Upgrades
- Getting Started
-
Authoring Basics
- Creating a New Page
- Checking a Page In or Out
- Deleting and Restoring Pages
- Completing Page Elements
- Uploading Assets to Ingeniux CMS
- Using Page View to Preview a Page
- Using Spellcheck
- Saving Pages
- Marking and Unmarking Pages for Publish
- Advancing Pages in Workflow
-
Editing Basics
- Locating Pages by xID
- Using Search to Locate Pages
- Assigning Pages
- Using In-Context Editing
- Reverting to a Previous Version of a Page
- Viewing Page Properties
- Managing Pages in Workflow
- Renaming Pages
- Creating New Page Layouts with Page Builder
- Creating Forms in Page Builder
- Validating User Input in Visual Form Builder
- Translating Content with Ingeniux WorldView
- Organizing Content
- Authentication and Authorization
-
Administration
- Key/Value Pairs in CMS local-appsettings.config
- Searching and Modifying CMS Content with Find and Replace
- Schema Designer
- Presentation Content Units
- Search Configuration
- System Options
- Users and Groups
- Page Creation Rules
- Workflows
- Managing Site-Wide Taxonomy Categories
-
Publishing System
- Configuring a Publishing Target
- Creating a Publishing Profile
- Working with Multi-Format Output and User Agents
- Setting Device Bundles in Device Manager
- How Dependencies Work
- Redirects
- Publish Monitor
- Reports
- Localization
- Maintenance
- InSite Search
- Topics for CMS Developers
- Ingeniux CMS 9 VPAT
- End-User License Agreement
- CMS 8
-
Cartella
- Cartella Overview
-
Installation and Setup
- Installing Cartella
- Uninstalling Cartella
- Advanced Setup
-
Using Cartella
- Settings
-
Folio and Module Managers
- Moderator
- Folio Administration
- Module Content
- Profiles and Directory
- Developing Cartella
- Scenarios
- Troubleshooting