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 Classic Database Documentation Template. This is compatible with all of our modern templates (Classic, Material and Light).
You can find out how to create a custom template here:
https://innovasys.zendesk.com/hc/en-gb/articles/360000765543-Creating-A-Custom-Template
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= %%</td><td
class="ColumnListCell">%%filtereditemlist:namespace=column,scrap=INDEX_COLUMNNAME_LIST,nocr=true%%</td><td Class="Centered">%%IndexProperty:Name=PrimaryKey,Format="<img src=template/packages/core-db/images/tick.gif>",BlankFormat= %%</td><td Class="Centered">%%IndexProperty:Name=Unique,Format="<img src=template/packages/core-db/images/tick.gif>",BlankFormat= %%</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.
Now, your output (and when editing or previewing in the Content File Editor) will now contain column details in the Index table, as illustrated below:
0 Comments