Browse Source

Added functionality to check if a static template bundle file is being used. No need to register the cog template in this scenario.

Wirecog 7 years ago
parent
commit
fa3ba1a2d3
1 changed files with 6 additions and 0 deletions
  1. 6
    0
      uxcog.go

+ 6
- 0
uxcog.go View File

@@ -62,6 +62,7 @@ func (u *UXCog) Element() *dom.Element {
62 62
 }
63 63
 
64 64
 func (u *UXCog) CogInit(ts *isokit.TemplateSet) {
65
+
65 66
 	u.hasBeenRendered = false
66 67
 	u.Props = make(map[string]interface{})
67 68
 	if ts != nil {
@@ -71,6 +72,11 @@ func (u *UXCog) CogInit(ts *isokit.TemplateSet) {
71 72
 	u.cogPrefixName = u.getCogPrefixName()
72 73
 
73 74
 	if isokit.OperatingEnvironment() == isokit.ServerEnvironment {
75
+
76
+		if isokit.UseStaticTemplateBundleFile == true {
77
+			return
78
+		}
79
+
74 80
 		u.RegisterCogTemplates()
75 81
 	}
76 82
 }