Templates

Add a Go template to your project with GXML tag <template/>.

Syntax

Template tags are placed at the root of your <templates/> tag.

HTML templates

HTML source used with templates are stored in your project’s tmpl directory. Templates files must have file extension .tmpl. Templates follow Go’s html template format.

Scope of HTML templates

Your GXML methods will be available to your templates as custom pipelines.

GXML attributes :

GXML content :

N/A

Comments

To comment a function use XML style comments. The comments must be in your tag’s GXML content. For example :

 <template>
 <!-- Comment -->
 </template>

Sample tag :

<templates>
	...
	<template name="Sample" tmpl="img" struct="" >
		<!-- Sample template loads HTML source from tmpl/img.tmpl -->
	</template> 
	...
</templates>


Exported to package:
Exports to files :
Writes tests to :