How To Use A Custom Content Item Type To Add Another Column To a Table In Database Documentation

This article will explain how to use a Custom Content Item Type to add another Column to the Tables in your Documentation. For example, you can create a new table column in the database documentation. This can be useful if you wish to show additional custom information.

To add a new editable column to a table, you would need to create a new Content Item Type in addition to a new Custom Template and then make some changes to the Scraps. Here is a useful video outlining how you create and use custom Content Item Types:

You can find out how to create a custom template here:

First navigate to the application Options and then Content Item Types. From there you need to create a new Content item type, with an Id and caption (for example, an ID of EXTENSION and a caption of EXTENSION). Then you need to associate it with the Column page Under database documentation in the Associations Section. You can then close the options page, making sure you save when prompted, and then restart Document! X.

Next, edit the _COLUMN_LIST_BODY scrap (found on the scraps page) in your custom template to the following:

<tr><td Class=i-centered NOWRAP>&nbsp;</td><td class="i-link"><STRONG>HowToUseACustomContentItemTypeToAddAnotherColumnToATableInYourDocumentation</STRONG></td><td class="i-description">&nbsp;</td><td></td><td></td><td Class="i-centered">&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td></td></tr>

where the ID would be, in the above example, EXTENSION

You would also need to edit the _COLUMN_LIST_HEADER scrap to include a header row for this new column:

<table class="i-column-list"><tr><th align=middle>&nbsp;</th><th NOWRAP class="i-pivot-column">ColumnName</th><th NOWRAP>Description</th><th NOWRAP>ColumnDatatype</th><th NOWRAP>ColumnLength</th><th NOWRAP>ColumnAllowNulls</th><th NOWRAP>Default</th><th NOWRAP>Formula</th><th NOWRAP>Extension</th></tr>

Note the final <th> element - change the Extension to the title you wish this element to have.

Finally, you need to save your template and make sure you are using your custom database template in the build profile editor.



Have more questions? Submit a request


Please sign in to leave a comment.