Include Index Column Detail In Table Overview Page

The Table Overview page generated by Document! X includes a table detailing the indexes defined for the Table. It is possible, by creating and modifying a custom Template, to include a new column in the summary table detailing the columns for each index.

Create a custom Database Documentation template

If you haven't already created a custom Template, create one (for Database documentation). Base your custom template on the standard 2012 Style Database Documentation Template. You can do this from the Custom Templates page in Options (select Options from the Tools Ribbon Tab).

This movie takes you through the process of creating a custom Template:
http://www.innovasys.com/movies/viewmoviefeed.aspx?id=8527235f-aba8-4b93-bf0a-41877bb69c1b

Add some new Scraps to the custom Template for the index column list

Add the following scraps to the custom Template (scrap name in bold, content below):

_INDEX_COLUMNNAME_LIST_BODY

%%ItemName%%

_INDEX_COLUMNNAME_LIST_SEPARATOR

,

Modify the Index List Scrap to include a new column

We will now use the new scraps we created above in a FilteredItemList Metadata Element. The new Metadata Element will be placed in a new Table column in the Index List Scrap.

Modify the scraps below as follows (scrap name in bold, content highlighted):

_INDEX_LIST_BODY

<tr><td class=%%IsNew:Format=LinkCell IsNew,BlankFormat=LinkCell%%><A HREF="%%itemqualifiedname%%.html">%%itemname%%</A></td><td class="DescriptionCell">%%strippedDescription:BlankFormat=&nbsp;%%</td><td
class="ColumnListCell">%%filtereditemlist:namespace=column,scrap=INDEX_COLUMNNAME_LIST,nocr=true%%</td>
<td Class="Centered">%%IndexProperty:Name=PrimaryKey,Format="<img src=dbimages/tick.gif>",BlankFormat=&nbsp;%%</td><td Class="Centered">%%IndexProperty:Name=Unique,Format="<img src=dbimages/tick.gif>",BlankFormat=&nbsp;%%</td></tr>

_INDEX_LIST_HEADER

<table class="FilteredItemListTable"><tr><th>%%TypeName%%</th><th>Description</th><th>Columns</th><th>PrimaryKey_Short</th><th>Unique_Short</th></tr>

Use your custom Template in your project

Open your Project in Document! X and on the Templates page in the Build Profile Editor choose your custom Template.

Done

Your output (and when editing or previewing in the Content File Editor) will now contain column details in the Index table, as illustrated below:

 

 

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.