Преглед на файлове

Fixing document generator

Andrea Fazzi преди 5 години
родител
ревизия
c542bb2386
променени са 1 файла, в които са добавени 5 реда и са изтрити 1 реда
  1. 5 1
      renderer/funcmap.go

+ 5 - 1
renderer/funcmap.go

@@ -194,7 +194,11 @@ func show(model string, id uint, format ...string) string {
 	plural := inflection.Plural(strings.ToLower(model))
 
 	args := []string{"tpl_layout", "base", "tpl_content", fmt.Sprintf("%s_%s", plural, action)}
-	args = append(args, format...)
+
+	if len(format) > 0 {
+		args = append(args, []string{"format", format[0]}...)
+	}
+
 	// q := query("tpl_layout", "base", "tpl_content", fmt.Sprintf("%s_%s", plural, action))
 	q := query(args...)