summaryrefslogtreecommitdiff
path: root/example
diff options
context:
space:
mode:
Diffstat (limited to 'example')
-rw-r--r--example/index.php4
-rw-r--r--example/templates/src/articles.html8
-rw-r--r--example/templates/src/custom_tags.tpl2
-rw-r--r--example/templates/src/master.html6
4 files changed, 10 insertions, 10 deletions
diff --git a/example/index.php b/example/index.php
index a0aa03c..3c7c5ba 100644
--- a/example/index.php
+++ b/example/index.php
@@ -34,10 +34,10 @@ $ste->register_tag("repeat",
$output = "";
if(!is_numeric($params["n"]))
throw new ste\RuntimeError("Sorry, but parameter n must be a number...");
-
+
for($i = 0; $i < $params["n"]; ++$i)
$output .= $sub($ste);
-
+
return $output;
}
);
diff --git a/example/templates/src/articles.html b/example/templates/src/articles.html
index 36f59c4..38cab10 100644
--- a/example/templates/src/articles.html
+++ b/example/templates/src/articles.html
@@ -29,7 +29,7 @@
<p>There are <a href="#">more articles</a>.</p>
</ste:then>
</ste:if>
-
+
<h2>Some more useless demo stuff...</h2>
<h3>Counting from 10 to 0...</h3>
<p>but take only the even ones and multiply by 5...</p>
@@ -41,15 +41,15 @@
</ste:then>
</ste:if>
</ste:for>
-
+
<h3>Repeat some text...</h3>
<ste:repeat n="10">
<p>Bla</p>
</ste:repeat>
-
+
<h3>Get a variable's content dynamically</h3>
<ste:get var="${foo}[$bar]" />
-
+
<h3>We will call ste:repeat with a non-numerical value for n here to see the handling of a RuntimeError</h3>
<ste:repeat n="lol">
<p>Bla</p>
diff --git a/example/templates/src/custom_tags.tpl b/example/templates/src/custom_tags.tpl
index 7e821c5..6ed0596 100644
--- a/example/templates/src/custom_tags.tpl
+++ b/example/templates/src/custom_tags.tpl
@@ -7,7 +7,7 @@
<ste:break />
</ste:then>
</ste:if>
-
+
<ste:if>
$_tag_parameters[counter]
<ste:then>
diff --git a/example/templates/src/master.html b/example/templates/src/master.html
index fe6b1e6..710b9d4 100644
--- a/example/templates/src/master.html
+++ b/example/templates/src/master.html
@@ -13,14 +13,14 @@
.offline {
color: #555;
font-style: italic;
-
+
}
</style>
-
+
</head>
<body>
<h1>example</h1>
-
+
<div id="content">
<ste:block name="content">
Default content.