// location for loading "purls"
app.setPurlPath("./purls");
-// location for resources
+// location for static resources
app.setResPath("./res");
// purl to load for main page, i.e. /
+// this will search for main.js from purls/ (this is the default)
app.setDefaultMainPurl("main");
-app.addMenu("name1", "/linkto1");
-app.addMenu("name2", "/linkto2");
-app.addMenu("name3", "/linkto3");
+
+// add some menu items for the default menu builder
+app.addMenu("Home", "/");
+app.addMenu("SimpleLayout", "/simplelayout");
+app.addMenu("LayoutOnly", "/justlayout");
+
+// default name for the application. Used by default section
+// builders where a name is required
app.setAppName("MyExampleApp");
+
+// set some default footer text (typically a copyright notice or something
app.setFooterText("<br><br><font size=\"-2\"><i>Copyright PJR.cc 2012 ©</i></font>");
app.start();
+
--- /dev/null
+exports.layout = function(request, response) {
+ var tkl = "<html><body><h1>Just a Layout</h1>this purl is simple a layout";
+ tkl += " and nothing else!</body></html>";
+
+ return tkl;
+}
\ No newline at end of file
if(typeof purlClass.layout == "undefined") {
console.log("set via undefined");
- purlLayout = layouts.standard();
+ purlLayout = layouts.standard(request, response);
} else {
// find and resolve the layout
- purlLayout = purlClass.layout();
+ purlLayout = purlClass.layout(request, response);
}
// now we should have a layout and a class