diff options
author | Steve Manuel <nilslice@gmail.com> | 2017-01-11 11:37:56 -0800 |
---|---|---|
committer | Steve Manuel <nilslice@gmail.com> | 2017-01-11 11:37:56 -0800 |
commit | ac82561825ab76f2b5db5c4086541e590fcb70cb (patch) | |
tree | a90bc1a4d8f26006916e48d346e4fd384859e1f4 /cmd | |
parent | bc35db8c462646b8e0ed3bbc94ceca51808a7787 (diff) |
extending the "addon" platform within ponzu to register, present and manage addons
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/ponzu/contentType.tmpl | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/cmd/ponzu/contentType.tmpl b/cmd/ponzu/contentType.tmpl index 7bf6f06..c16cfd6 100644 --- a/cmd/ponzu/contentType.tmpl +++ b/cmd/ponzu/contentType.tmpl @@ -9,14 +9,13 @@ import ( type {{ .Name }} struct { item.Item - editor editor.Editor {{ range .Fields }}{{ .Name }} {{ .TypeName }} `json:"{{ .JSONName }}"` {{ end }} } -// MarshalEditor writes a buffer of html to edit a {{ .Name }} -// partially implements editor.Editable +// MarshalEditor writes a buffer of html to edit a {{ .Name }} within the CMS +// and implements editor.Editable func ({{ .Initial }} *{{ .Name }}) MarshalEditor() ([]byte, error) { view, err := editor.Form({{ .Initial }}, // Take note that the first argument to these Input-like functions @@ -41,9 +40,4 @@ func ({{ .Initial }} *{{ .Name }}) MarshalEditor() ([]byte, error) { func init() { item.Types["{{ .Name }}"] = func() interface{} { return new({{ .Name }}) } -} - -// Editor is a buffer of bytes for the Form function to write input views -// partially implements editor.Editable -func ({{ .Initial }} *{{ .Name }}) Editor() *editor.Editor { return &{{ .Initial }}.editor } - +}
\ No newline at end of file |