From 14a544ee6476483ef6aa47c8db613223c6835e4a Mon Sep 17 00:00:00 2001
From: echicken <>
Date: Thu, 30 Aug 2012 20:59:02 +0000
Subject: [PATCH] Adding template pages.

---
 .../ecwebv3/pages/Templates/999-html.html     | 21 ++++++++++++++
 .../ecwebv3/pages/Templates/999-ssjs.ssjs     | 18 ++++++++++++
 web/root/ecwebv3/pages/Templates/999-txt.txt  | 10 +++++++
 web/root/ecwebv3/pages/Templates/999-xjs.xjs  | 28 +++++++++++++++++++
 4 files changed, 77 insertions(+)
 create mode 100644 web/root/ecwebv3/pages/Templates/999-html.html
 create mode 100644 web/root/ecwebv3/pages/Templates/999-ssjs.ssjs
 create mode 100644 web/root/ecwebv3/pages/Templates/999-txt.txt
 create mode 100644 web/root/ecwebv3/pages/Templates/999-xjs.xjs

diff --git a/web/root/ecwebv3/pages/Templates/999-html.html b/web/root/ecwebv3/pages/Templates/999-html.html
new file mode 100644
index 0000000000..2bafd4b7e5
--- /dev/null
+++ b/web/root/ecwebv3/pages/Templates/999-html.html
@@ -0,0 +1,21 @@
+<!--Document Title-->
+
+<!--
+The first comment in an XJS or HTML document will be used as its title in the
+"pages" sidebar module (where the "Home" and "Forum" links appear.)  In the
+comment above, replace "Document Title" with whatever you want your page to
+be called, or "HIDDEN" to prevent it from appearing in the list.
+-->
+
+<html>
+
+<head></head>
+
+<body class="background font">
+<span class="title">HTML Document</span>
+<br />
+This is an HTML document.  Use this template as a starting point for creating
+other HTML content for your website.
+</body>
+
+</html>
\ No newline at end of file
diff --git a/web/root/ecwebv3/pages/Templates/999-ssjs.ssjs b/web/root/ecwebv3/pages/Templates/999-ssjs.ssjs
new file mode 100644
index 0000000000..9d61616bfc
--- /dev/null
+++ b/web/root/ecwebv3/pages/Templates/999-ssjs.ssjs
@@ -0,0 +1,18 @@
+//Document Title
+
+/*	The first comment line in an SSJS page will be used as its title in the
+	"pages" sidebar module (where the "Home", "Forum" and links to other
+	local pages appear.)  Edit "Document Title" above as desired, replacing
+	it with "HIDDEN" if you do not want this page to appear in the list. */
+
+load('webInit.ssjs');
+
+print("<span class='title'>SSJS Page</span><br /><br />");
+print("This is a Server-Side Javascript page.  It's more cumbersome than an");
+print("XJS page, but can be useful in certain situations.<br /><br />");
+
+// SSJS example:
+if(user.alias == webIni.WebGuest)
+	print("You are not logged in.");
+else
+	print("You are logged in as " + user.alias);
\ No newline at end of file
diff --git a/web/root/ecwebv3/pages/Templates/999-txt.txt b/web/root/ecwebv3/pages/Templates/999-txt.txt
new file mode 100644
index 0000000000..ba45b08e78
--- /dev/null
+++ b/web/root/ecwebv3/pages/Templates/999-txt.txt
@@ -0,0 +1,10 @@
+Document Title
+
+This is a text file.  It can contain whatever you want, but bear in mind that
+the first line of the file will be used as its title in the "pages" sidebar
+module.  If the first line of the file reads:
+
+HIDDEN
+
+then it will not be shown in the list.  ("HIDDEN" will be removed from the
+output when the page is displayed.)
\ No newline at end of file
diff --git a/web/root/ecwebv3/pages/Templates/999-xjs.xjs b/web/root/ecwebv3/pages/Templates/999-xjs.xjs
new file mode 100644
index 0000000000..58f24e67d9
--- /dev/null
+++ b/web/root/ecwebv3/pages/Templates/999-xjs.xjs
@@ -0,0 +1,28 @@
+<?xjs load('webInit.ssjs'); ?>
+
+<!--Document Title-->
+
+<!--
+The first comment in an XJS or HTML document will be used as its title in the
+"pages" sidebar module (where the "Home" and "Forum" links appear.)  In the
+comment above, replace "Document Title" with whatever you want your page to
+be called, or "HIDDEN" to prevent it from appearing in the list.
+-->
+
+<html>
+
+<head>
+<link rel="stylesheet" type="text/css" href="../style/style.css" />
+</head>
+
+<body class="background font">
+<span class="title">XJS Page</span>
+<br />
+This is an XJS page.  It's an HTML document, but you can also insert inline
+server-side javascript statements such as:
+
+Hello, <?xjs write(user.alias); ?> welcome to <?xjs write(system.name); ?>!
+
+</body>
+
+</html>
\ No newline at end of file
-- 
GitLab