Adjusting Default HTML and CSS Templates
In
Codebeamer there are the following customizable
Velocity templates
available:
file | purpose |
---|
mhtml-decoration.vm | This velocity file adds the necessary HTML decorations to the various html fragments found in the docx template file. For example this adds the html header, html body and defines the default page size and orientation. |
mhtml-export-css.vm | Contains the CSS styling applied on the each exported HTML fragment. This is what mainly controls the look of each HTML elements in Word. |
Both files are located in the $CB_HOME/tomcat/webapps/cb/config/templates/html directory. These files are plain text files, so for customizing them just open them in your favorite text editor. As soon as the changes saved they will be immediately applied without need of Codebeamer restart.
An example: if we want to change the look of the tables in our export result, like change the color and font-type then edit the mhtml-export-css.vm and add this to the end of it:
table td {
color: red !important;
font-family: 'courier' !important;
}
As result table will appear as this in the export: