Defining content types
When you create a new content type, you define the coding method used to create the content item, as well as register the code with iMIS and add the content item to the Content Gallery. Once the new content item is added to the Content Gallery, it is available to be used again on a content record.
In the Staff site, go to RiSE > Maintenance > Content types. Do one of the following:
- Create a new content type: Select New > Content Type. When you select to create a new content type, you can choose Client-based or ASCX-based content items.
- Edit an existing content type: Select an existing content type, then from the toolbar click Edit.
Client-based content items are uploaded as .zip files through the document system in RiSE. Once the .zip file is extracted, you can then tell the Content Type utility where to find the uploaded content item html files (URL to the html file that is used to display items of this type at runtime and URL to the html file that is used to configure content items of this type fields).
Note: The folder structure for the content item is defined by the folder structure in the .zip file. For example, if WidgetWorld.zip contains a top-level folder named WorldOne, the content item will have a root folder named WorldOne. It is recommended that all files related to one content item be organized within a single folder.
Client-based content items can also be created external to iMIS systems. You can create your content, then point your system to your content items. For example, the entry point could be https://myCDN/WidgitWorld/HelloWorld/index.html. For more information, refer to Developing a client-based iPart.
Note: You can view a sample client-based content item on GitHub.
Do the following to deploy a client-based content item:
- Upload the zip file to the iMIS Document system:
- Go to RiSE > Document system and select the iPartSource folder. If the folder does not exist, you must create it:
- Go to RiSE > Document system.
- Select New > Folder.
- Enter iPartSource as the Folder Name.
- Select Allow only the following types of objects in this folder (select all that apply).
- Highlight Zip File and click Save.
- Highlight the iPartSource folder. Select New > Zip File and upload the zip file you created.
- Provide a description and click Upload. The zip file will then be displayed in the iPartSource folder.
Note: Make sure your folder is named iPartSource. iMIS looks for correct spelling and case on the folder name.
This is the folder into which all client-based content items must be uploaded.
Note: iMIS will extract your .zip files automatically if they are uploaded to the correct folder. Make sure your folder is named iPartSource. iMIS looks for spelling and case on the folder name.
- Add a new content type to expose the content item and specify the URL to the index.html file. When a content type is created, iMIS registers the new content item and adds it to the Content Gallery.
- In the iMIS Staff site, go to RiSE > Maintenance > Content types.
- Create a new folder with a unique name (for example, Widget World) if it does not already exist. Select the Allow only the following types of objects in this folder option and select Content Type only from the list.
- Click Save.
- Highlight the new folder and select New > Content Type.
- Select Client-based (preferred) and enter a name and description for the content type.
- In the URL to the html file that is used to display items of this type at runtime field, provide the relative path to the initial HTML file, for example:
- In the URL to the html file that is used to configure content items of this type field, provide the relative path to your configuration file for your new content item, if you created one.
- Advanced Properties – For more complex content items, you can optionally specify any of three advanced properties if they apply:
- (Optional) Enter the URL to the control or page that is used to collect parameters for content items of this type.
- Enter the URL to the icon graphic that represents items of this type.
- Enter the URL to the configuration help page.
- Click Save.
Note: Create a folder with the name of your organization for organizing your custom content items. This will prevent your content items from being accidentally overwritten. The folder is also added to the Content Gallery.
Note: The URLs you enter for the following properties should be entered as a relative path to the deployment folder named iPartSource. You need to enter the same folder path as created for the zip file. For example, if the folder path was WidgetWorld/HelloWorld, you would enter the following as the URL:
~/iPartSource/name-of-zip-file/WidgetWorld/HelloWorld/filename
You can also host the content items outside of iMIS. For example, the entry point could be:
https://myCDN/WidgitWorld/HelloWorld/index.htmlNote: Make sure your folder is named iPartSource.
iMIS looks for correct spelling and case on the folder name.~/iPartSource/WidgetWorld.zip/WidgetWorld/HelloWorld/index.html
The new content item is added to the iMIS Content Gallery and can be added to content records for publishing.
The class libraries and user controls that you specify must be manually copied to a file path that resolves to the same root-relative URL on all servers that host iMIS RiSE websites.
- The class libraries must be placed in the bin folder below the root of the physical path for the IIS application or IIS website that hosts your iMIS RiSE websites.
- The user controls can be placed in any folder below the root of the physical path. When specifying paths to controls, be sure to use forward slashes (/) for the segment delimiters.
Note: The class libraries should also be added to the C:\AsiPlatform\iMISService_[instance]\bin folder. If you are not self-hosted, you must contact your host for assistance.
For more information, refer to Developing webform-based iParts (ASCX).
Enter the following information for your new content item:
- (Required) Name of the Content Type - Specifies the name of the associated content item.
- (Required) Description of the Content Type - Specifies the description of the associated content item.
Note: If you are publishing this content item in the Content Gallery, be sure this text is as you want it to appear to users in the Gallery when they select content items for use in content records, and do not duplicate any content item names already appearing in the Gallery.
- (Client-based only) URL to the html file that is used to display items of this type at runtime - The initial html page for your content item.
- (Client-based only) URL to the html file that is used to configure a content items of this type - Provide the external URL to your configuration file for your new content item, if you created one.
Note: This path can be an external URL for example, ~/iPartSource/helloworld.zip/helloworld/index.html. If you have existing files that you have uploaded to the Document system, those files will still be operational.
While developing an iPart, you can use DoNotCache on the content type URL to disable the caching on the index.html file. You no longer need to clear the iMIS cache when you make changes to your index.html file.
Warning! Do not go live with the DoNotCache option in place; it will affect performance negatively.
A custom attribute for a <script>
named Polyfill is available. This attribute pushes your imported content to the <head>
of the Document Object Model (DOM). The filename is also deduped.
Note: Only the filename is deduped. If you import the same file from multiple paths or CDNs, iMIS will randomly select the file that is imported.
This custom attribute does not apply to polyfills only; you can use the attribute on any script import you want pushed to the <head>
of the DOM.
When an imported <script>
is pushed to the <head>
of the DOM, iParts are also de-duped. If you have three iParts on the same page, each with the same imports, the filename is deduped and there is one entry only for the <script>
import on the DOM.
This is helpful as some APIs, for example zonejs, will allow importing once only.
- URL to the control or page that is used to collect parameters for content items of this type - Specifies a relative URL (from the root (~) of the physical path for the IIS application or IIS website that hosts your iMIS RiSE websites) to the web user control that should be used to collect parameter overrides for the content item associated with this content type. By default, the root corresponds to C:\Program Files (x86)\ASI\iMIS\Net. For example, ~/CustomControls/myUserControl.aspx.
You use this type of control to override the configuration of a content item on a per-navigation-item basis. The parameter overrides can be specified in two different ways in a navigation item, depending on what type of input this control is written to accept:
- The URL parameters field can pass parameters in an ampersand-delimited string that is appended to the URL, and fetches the associated content record.
- The Content parameters field can display selected properties from the control that define the configuration page for the associated content item. This is a subset of the properties defined in the control specified in the URL to the control or page that is used to edit the properties of an existing item of this type field.
Only one of the content types shipped with iMIS RiSE uses this field (Content Tagged List), and the corresponding control is written to collect parameters from the Content parameters section of a navigation item.
Note: This can be an external URL.
- URL to the icon graphic that represents items of this type - Specifies a relative URL (from the root (~) of the physical path for the IIS application or IIS website that hosts your iMIS RiSE websites) to an Easy Edit icon image file that is displayed on rendered web pages associated with this content type. By default, the root corresponds to C:\Program Files (x86)\ASI\iMIS\Net. For example, ~/CustomControls/mySurfToEditIcon.gif.
The image file must be 16x16 pixels in size. If this field is left blank, a default Easy Edit icon is used (~/AsiCommon/icon_con_usercontrol.gif).
Note: This can be an external URL.
- URL to the configuration help page - Specifies a relative URL (from the root (~) of the physical path for the IIS application or IIS website that hosts your iMIS RiSE websites) to the Configuration Help for the content item associated with this content type. This Help page displays when you click the link when configuring a content item. By default, the root corresponds to C:\Program Files (x86)\ASI\iMIS\Net. For example, ~/iparts/Common/QueryMenu/QueryMenuHelp.htm.
The visual look and feel of the Help page is based on the iMIS theme you have selected. To be consistent with the rest of iMIS, we recommend that you only use basic HTML and allow iMIS to style the page. However, if needed, you can tailor the page using internal CSS.
Note: This can be an external URL.
- (Required) URL to the control or page that is used to display items of this type at runtime - Specifies a relative URL (from the root (~) of the physical path for the IIS application or IIS website that hosts your iMIS RiSE websites) to the web user control that should be used to display instances of the content item associated with this content type. By default, the root corresponds to C:\Program Files (x86)\ASI\iMIS\Net. For example, ~/CustomControls/myUserControl.aspx.
- (Required) Name of the .NET assembly that contains the class that implements this content type - Specifies the name of the class library that contains the compiled serializable class.
- (Required) Name of the serializable class within the assembly that implements this content type. Fully qualified name with namespace - Specifies the name of the class that implements the content item in Page Builder (which must inherit the base class Asi.Business.ContentManagement.ContentItem). You must enter the fully qualified class name, including the namespace.
- (Required) Name of the .NET assembly that contains the IContentType class used to publish this content type - Specifies the name of the class library that contains the compiled IContentType class:
- If you are using the base IContentType class provided with iMIS RiSE for this content type, enter Asi.Business.ContentManagement.
- If you are using a custom-developed IContentType class, enter the name of the class library that contains the compiled class.
- (Required) Name of the IContentType class within the assembly. Fully qualified name with namespace - Specifies the name of the class that implements the IContentType interface that iMIS RiSE uses to render and publish the content item.
- To use the default rendering and publishing behavior provided by the base IContentType class provided with iMIS RiSE, enter Asi.Business.ContentManagement.ContentType.ContentTypeBase.
- To perform custom actions when a content item is published or rendered, you can instead create a custom IContentType class (which must inherit the base class (Asi.Business.ContentManagement.ContentType.ContentTypeBase). You must enter the fully qualified class name, including the namespace.
- (Required) URL to the control or page that is used to collect the properties of a new item of this type - Specifies a relative URL (from the root (~) of the physical path for the IIS application or IIS website that hosts your iMIS RiSE websites) to the web user control that should be used to collect properties when creating new instances of the content item associated with this content type. By default, the root corresponds to C:\Program Files (x86)\ASI\iMIS\Net. For example, ~/CustomControls/myUserControl.aspx.
- URL to the control or page that is used to edit the properties of an existing item of this type. This is often the same as the NewLink - Specifies a relative URL (from the root (~) of the physical path for the IIS application or IIS website that hosts your iMIS RiSE websites) to the web user control that should be used to collect properties when editing the configuration of an existing content item associated with this content type. By default, the root corresponds to C:\Program Files (x86)\ASI\iMIS\Net. For example, ~/CustomControls/myUserControl.aspx.
- URL to the control or page that is used to collect parameters for content items of this type - Specifies a relative URL (from the root (~) of the physical path for the IIS application or IIS website that hosts your iMIS RiSE websites) to the web user control that should be used to collect parameter overrides for the content item associated with this content type. By default, the root corresponds to C:\Program Files (x86)\ASI\iMIS\Net. For example, ~/CustomControls/myUserControl.aspx.
You use this type of control to override the configuration of a content item on a per-navigation-item basis. The parameter overrides can be specified in two different ways in a navigation item, depending on what type of input this control is written to accept:
- The URL parameters field can pass parameters in an ampersand-delimited string that is appended to the URL, and fetches the associated content record.
- The Content parameters field can display selected properties from the control that define the configuration page for the associated content item. This is a subset of the properties defined in the control specified in the URL to the control or page that is used to edit the properties of an existing item of this type field.
Only one of the content types shipped with iMIS RiSE uses this field (Content Tagged List), and the corresponding control is written to collect parameters from the Content parameters section of a navigation item.
- URL to the icon graphic that represents items of this type - Specifies a relative URL (from the root (~) of the physical path for the IIS application or IIS website that hosts your iMIS RiSE websites) to an Easy Edit icon image file that is displayed on rendered web pages associated with this content type. By default, the root corresponds to C:\Program Files (x86)\ASI\iMIS\Net. For example, ~/CustomControls/mySurfToEditIcon.gif.
The image file must be 16x16 pixels in size. If this field is left blank, a default Easy Edit icon is used (~/AsiCommon/icon_con_usercontrol.gif).
- URL to the configuration help page - Specifies a relative URL (from the root (~) of the physical path for the IIS application or IIS website that hosts your iMIS RiSE websites) to the Configuration Help for the content item associated with this content type. This Help page displays when you click the link when configuring a content item. By default, the root corresponds to C:\Program Files (x86)\ASI\iMIS\Net. For example, ~/iparts/Common/QueryMenu/QueryMenuHelp.htm.
The visual look and feel of the Help page is based on the iMIS theme you have selected. To be consistent with the rest of iMIS, we recommend that you only use basic HTML and allow iMIS to style the page. However, if needed, you can tailor the page using internal CSS.
If you have not created a custom IContentType class (you entered Asi.Business.ContentManagement.ContentType.ContentTypeBase in the Name of the IContentType class within the assembly field), a declaration to this control is embedded in published pages that use the content item, and the control will be dynamically loaded and inserted into the page when rendering the control (for preview or for search). If you've implemented a custom IContentType class, you can change this behavior to match your own requirements.
In most cases, you should specify the same control here as for the URL to the control page that is used to edit the properties of an existing item of this type.
Note: This control is currently unused in this version of iMIS RiSE. Instead, the control specified in URL to the control page that is used to edit the properties of an existing item of this type is used for collecting the properties for newly created content items and for existing content items that are being edited.
In most cases, you should specify the same control here as for the URL to the control page that is used to collect the properties of a new item of this type.