Article Details
| Id: | 11127 |
| Product: | finPOWER Connect |
| Type: | NEW |
| Version: | 1.06.08 |
| Opened: | 19/04/2013 |
| Closed: | 17/05/2013 |
| Released: | 28/05/2013 |
| Job: | J011483 |
Documents; HTML type Documents can now specify a 'template'
HTML type Documents can now specify a 'template' which can then be used in the Document's Script instead of building the HTML internally.
The following sample shows a simple tag substitution HTML Document using a new method in finDocumentFunctions to ensure values are HTML encoded:
Dim DocumentId As StringDim strTemp As String' Assume SuccessMain = True' Handle EventsSelect Case eventIdCase "Publish"' Get Document IdDocumentId = DirectCast(parameters, ISKeyValueList).GetString("DocumentId")' Pick up templatestrTemp = finBL.Documents(DocumentId).TemplateDocument' Replace tagsMain = finBL.DocumentFunctions.ResolveTaggedMessageHtml(strTemp, Now.Date, text, "L10000")End Select
NOTE: This is a highly simplified version of an HTML Document and does not cater for any Document Parameters or when publishing the Document from a Log.
If the Document does not have a Script and is being published via an Account, Client or User Log, a simple tag replacement will be made in the HTML generated.