Browse Source

Optimization (page template options)

Vova Tkach 5 years ago
parent
commit
490b38284d
1 changed files with 6 additions and 8 deletions
  1. 6 8
      engine/modules/module_index.go

+ 6 - 8
engine/modules/module_index.go

@@ -15,21 +15,19 @@ import (
 func (this *Modules) index_GetTemplateSelectOptions(wrap *wrapper.Wrapper, template string) string {
 func (this *Modules) index_GetTemplateSelectOptions(wrap *wrapper.Wrapper, template string) string {
 	result := ``
 	result := ``
 
 
-	selected := ""
-
 	// index.html
 	// index.html
+	result += `<option title="index.html" value="index"`
 	if template == "index" {
 	if template == "index" {
-		selected = " selected"
+		result += ` selected`
 	}
 	}
-	result += `<option title="index.html" value="index"` + selected + `>index.html</option>`
-	selected = ""
+	result += `>index.html</option>`
 
 
 	// page.html
 	// page.html
+	result += `<option title="page.html" value="page"`
 	if template == "" || template == "page" {
 	if template == "" || template == "page" {
-		selected = " selected"
+		result += ` selected`
 	}
 	}
-	result += `<option title="page.html" value="page"` + selected + `>page.html</option>`
-	selected = ""
+	result += `>page.html</option>`
 
 
 	return result
 	return result
 }
 }