Exemple #1
0
        public bool render(SynkContext context)
        {
            var viewFile = context.targetView;
            var viewPath = context.currentModule.name + "/" + viewFile;

            if (!System.IO.File.Exists("views/" + viewPath + ".html"))
            {
                viewPath = "common/" + viewFile;


                if (!System.IO.File.Exists("views/" + viewPath + ".html"))
                {
                    context.kill("Could not load view '" + context.targetView + "' for " + context.currentModule.name);
                    return(false);
                }
            }

            context.PushTemplate(viewPath);
            context.Render();
            return(true);
        }
Exemple #2
0
 public virtual void OnInvalidAction(SynkContext context, string action)
 {
     context.kill("Invalid action " + action + " on module " + this.name);
 }