Here's the source code for the page 'source'. View the page
0001: <?mml version="1.2"?>
0002: @@<
0003: View the source code for an MML file. For information on the mml
0004: format, I suggest you look at the page 'aboutmml'. The structure
0005: of an MML page is sorted into two different types, first level
0006: instructions (comments and declarations, stored internally inside
0007: an Mml object) and second level code (passed on as-is to the parser).
0008: >@@
0009: <?mml-vars title="MML Source Viewer" updated="250903"?>
0010:
0011: [parse:`
0012: if ($ENV{QUERY_STRING} =~ /^(\w+)$/ && -e filepath($1,'PAGE')) { !SOURCE = $1 }
0013: else { !SOURCE = $INFO }
0014: !SOURCEPATH = filepath(!SOURCE,'PAGE');
0015: return;
0016: `]
0017:
0018: ==View Source== {SOURCE
0019: <p><b>Here's the source code for the page '[var:"SOURCE"]'.
0020: <a href="[var:'SOURCE'].html">View the page</a></b></p>
0021: <div style="overflow:auto;">
0022: [code:"!SOURCEPATH"]
0023: </div>
0024: SOURCE}
0025:
0026: ==Pages Viewable== {PAGES
0027: <p>Below are the current pages that have been written in MML. The other
0028: pages are all being created directly by Perl code but are also parsed
0029: as MML before converted to xHTML.</p>
0030: <div>
0031: [parse:`
0032: my @sourcelist = dircontents('page');
0033: my @outlist,$tmpvar;
0034: foreach (@sourcelist) {
0035: if (/(\w+)\.txt/) { push @outlist, $1 }
0036: }
0037: map {
0038: $_ = '<a class="dir" href="source.html?'.$_.'">'.
0039: '<icon=[fl]file alt="[MML] ">'.$_.'</a>CLRL{}';
0040: } @outlist;
0041: join('','<cleardiv>',replacedata(@outlist),'<cleardiv>');
0042: `]
0043: </div>
0044: PAGES}
Below are the current pages that have been written in MML. The other pages are all being created directly by Perl code but are also parsed as MML before converted to xHTML.