summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'cmd')
-rw-r--r--cmd/ponzu/contentType.tmpl12
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