Please enable JavaScript to view this site.

GridHTML

This parameter determines the table definition, the layout of tables inserted into e-mail (HTML) format templates.

When you don’t make use of e-mail (HTML) templates – and when you do make use of them but your templates don’t contain any tables –, this parameter plays no role.

Example of an HTML template

<html>

<body>

<p>It is our pleasure to invite you to our seminar where the following products will be discussed.

<br>

[$GetHtmlTable("Prod", entity="Prod", columndefs="GridHTML",

columns="NAME,QUANTITY{CENTER},PRICE{NUMERIC},DISCOUNT{CENTER},COMMENT,VAT,TOTAL{NUMERIC}", sum="TOTAL")]

<br>

Your attendance would be highly appreciated; we look forward to seeing you there.</p>

</body>

</html>

Examples of the HTML template tag GetHtmlTable

[$GetHtmlTable('CONT', entity='Cont', columndefs='GridHTML', columns='NAME,FIRSTNAME,JOBTITLE')]

[$GetHtmlTable('PROD', entity='Prod', columndefs='GridHTML', columns='NAME,PRICE,QUANTITY,TOTAL{NUMERIC}', sum='TOTAL')]

dsgn_insert-detail-table

Templates in Efficy are a highly effective way of quickly creating standard, professionally looking documents and e-mail messages that use data from the CRM database – the names of contacts, addresses of companies etc.

The user for instance generates an instant e-mail message from a contact. You display a table that lists all the contact persons linked to that contact. Or you show a table of products with a final sum at the end of the table.

[$GetHtmlTable('Cont', entity='Cont', columndefs='GridHTML', columns='NAME,FIRSTNAME,JOBTITLE')]

[$GetHtmlTable('Prod', entity='Prod', columndefs='GridHTML', columns='NAME,PRICE,QUANTITY,TOTAL{NUMERIC}', sum='TOTAL')]

dsgn_instant-e-mail-command

download the manual on document and e-mail templates from our FTP site

Objective

To support tables in template-based e-mail messages, the tables’ layout must be defined beforehand: the system needs to know in advance how to display the columns – and it all depends on your corporate identity. Well, the parameter GridHTML handles this issue.

dsgn_sys-storage-gridhtml

Strictly speaking, the parameter doesn’t have to be named GridHTML, it can be another name. Know however that all e-mail (HTML) templates with tables that require this layout must carry the correct name!

This also means you can develop different layouts for tables in template-based e-mail messages: as long as the custom layouts are stored in SYS_STORAGE and as long as the template tags [$GetHtmlTable] in HTML templates load the correct table layout, things will work.

[$GetHtmlTable('CONT', entity='Cont', columndefs='GridHTML', columns='NAME,FIRSTNAME,JOBTITLE')]

[$GetHtmlTable('PROD', entity='Prod', columndefs='HTMLColumns', columns='NAME,PRICE,QUANTITY,TOTAL{NUMERIC}', sum='TOTAL')]

Still, most clients establish a single table definition named GridHTML which gets reused in all HTML templates.

reference info on the template tags: the tag GetHtmlTable

dsgn_reference-info-template-tags

The syntax is similar to the one in GridColumns.txt, the file that defines grid columns in consulting windows.

customizing Efficy: defining grid columns

dsgn_gridcolumns-txt-file

Example

The standard example for GridHTML is predefined in the table SYS_STORAGE. Adapt or replace this table definition so that it fits your needs and applies your corporate identity.

starttable [<table border="0" width="100%" cellspacing="0" cellpadding="2">]

endtable [</table><table border="0" width="100%" cellspacing="0" cellpadding="0"><%GetBorder("gray;white;/4")%></table>]

startheader [<tr class="GridHeader" id="hrow">]

endheader [</tr>]

startrow [<tr align="left" class="<#C:GridRow,GridRowAlt>" onMouseOver="this.className='GridRowHighLight'" onMouseOut="this.className='<#C:GridRow,GridRowAlt>'">]

startrow.Hist [<tr align="left" <#C:,bgcolor=#dddddd> class="<#I=OPERATION;P=FieldOp;#ELSE=RecordOp>" onMouseOver="this.style.backgroundColor='#eeeeee'"

onMouseOut="this.style.backgroundColor='<#C:transparent,#dddddd>'">]

startrow.Docu, startrow.Acti [<tr align="left" class="<#C:GridRow,GridRowAlt>" onMouseOver="this.className='GridRowHighLight'"

onMouseOut="this.className='<#C:GridRow,GridRowAlt>'" title="<#F=MEMO;absent=true;size=255;PureText=true>">]

endrow [</tr>]

sumstartrow [<tr align=left>]

sumendrow [</tr>]

sumspacer [<td colspan=$COLUMNPOS$ class="Grid"></td>]

sumline [<td class="Grid"><table cellspacing="0" cellpadding="0" border="0" width="100%"><%GetBorder("#666666;#CCCCCC")%></table></td>]

sumfield [<td class="Grid"><b><#F=$FIELD$></b></td>]

sumfield.CENTER [<td class="Grid" align="center"><b><#F=$FIELD$></b></td>]

sumfield.DURATION [<td class="Grid" align="right"><b><#F=$FIELD$;format=duration></b></td>]

sumfield.NUMERIC [<td class="Grid" align="right"><b><#F=$FIELD$></b></td>]

sum [<td class="Grid"><b><#F=$FIELD$></b></td>]

sum.CENTER [<td class="Grid" align="center"><b><#F=$FIELD$></b></td>]

sum.DURATION [<td class="Grid" align="right"><b><#F=$FIELD$;format=duration></b></td>]

sum.NUMERIC [<td class="Grid" align="right"><b><#F=$FIELD$></b></td>]

th [<th nowrap align="left"><#H=$FIELD$;sort=true></th>]

td [<td class="Grid"><#F=$FIELD$></td>]

td.NUMERIC [<td class="Grid" align="right"><#F=$FIELD$></td>]

customizing Efficy: grid tagsreference info on grid tags

dsgn_grid-tags

© 2006-2020 Efficy All rights reserved