You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (($substr == tEnConst || $substr == tEnVar || $substr == tEnFile) && !$finalValue) // We're looking for the variable input chains.
254
+
$start++;
255
+
else
256
+
$finalValue = true;
257
+
if ($substr == tEnTableK && $primaryIn == tEnTableB && $tPosition == null) { // When we find a table's K value, then we unlock finalValue and change the tPosition.
258
+
$tPosition = $size;
259
+
$tStart = $start;
260
+
$finalValue = false;
261
+
$start = $size;
262
+
}
263
+
if ($substr == tEnTagE) // When we find the end tag, we know it's ended.
<p>This is a showcase of all of the template engine's feature.</p>
4
4
<hr>
5
5
<ul>
6
6
<li>Constants are \[!likeThis], [!likeThis]!</li>
7
7
<li>Variables are \[@likeThis], [@likeThis]!</li>
8
8
<li>Files are \[#likeThis.html], [#likeThis.html]!</li>
9
-
<li>Tables are tags chained together are \[*fileName.html:!inputArray], and then repeatedly call upon \[^] or \[^tablePosition].</li>
9
+
<li>Tables are technically two tags chained together are \[*fileName.html:!inputArray], and then repeatedly call upon \[^] or \[^tablePosition].</li>
10
10
</ul>
11
-
<p>Tables are a bit more involved, and work like this:</p>
11
+
<p>Tables are a bit more involved. The idea is that a file is loaded in with *, and then a two dimensional array is after ;. The table is filled with ^ tags, which are replaced with data in the ; array's second dimension. This is repeated until the first dimension of the array is exhausted. Below is an example of it in action.</p>
12
12
<table>
13
13
[*table.html:@tableInput]
14
14
</table>
15
-
<table>
16
-
[*!thisLike:!thisLike]
17
-
</table>
18
15
<p>As you can see, tables are a <i>very</i> powerful feature which open up many different possibilities.</p>
19
16
<p>Another little interesting factoid is that file tags are first tested relative to the template, then relative to the script, and finally absolute. This means that you can place your templates folder anywhere you damn well please, and have it work just fine. Some examples include [#relativeFile.html], [#test2/relativeFile.html], and [#test3/relativeFile.html].</p>
20
17
<hr>
21
18
<p>Finally, this engine DOES support chaining together constant and variable tags with others, as well as file piping as input for variable names and such. That can look a bit like \[#@likeThis], \[^!likeThis], or even \[@!likeThis]. You can see this in action with [@!thisLike].</p>
22
-
<p>Please note that piping files as variable names can lead to very strange results, and should be used sparingly, if not <b>NEVER</b>! It's simply there for specific edgecases. Also note that if safe insertion is enabled(is it enabled:[!tEnSafeInsert]? It is by default), you may have to call upon the method <b>refreshRequests()</b> multiple times in order to allow access to all chained/piped values.</p>
19
+
<p>Please note that piping files as variable names can lead to very strange results, and should be used sparingly, if not <b>NEVER</b>! It's simply there for specific edgecases. Also note that if safe insertion is enabled(is it enabled:[!tEnSafeInsert]! It is by default,) you may have to call upon the method <b>refreshRequests()</b> multiple times in order to allow access to all chained/piped values.</p>
0 commit comments