Source Code for user.html.macros.wmPages
on wmPages (objprefix, lineStart="Page ", lineNumbers=true, prefixEnd=":", linkStart="", linkEnd="", lineEnd="<br>\r" ) {
«wmPages - Phil Suh
«Wed, Feb 18, 1998 at 8:08:46 PM by PS
«Docs
«create a numbered index of pages ala webmonkey
«http://www.webmonkey.com/
«only indexes pages in the same table as the adrobject
«that begin with the "objprefix" string
«outputs a html listing of links to the pages
local {
adrpagetable = html.data.adrpagetable;
adrtable = parentOf (adrpagetable^.adrobject^);
ct, i, ttr; «counter, loop variable, textToReturn
pnum=0, ptitle, pname; «page variables
adrCacheTable = @system.temp.wmPagesCache};
on add (s) {
ttr = ttr + s};
ct = sizeOf (adrTable^);
for i = 1 to ct { «build wmPages
pname = nameOf (adrTable^[i]);
if pname beginsWith objPrefix {
window.msg ("wmPages: " + pname);
ptitle = html.getonedirective ("title", string(adrTable^[i]));
add (lineStart);
if lineNumbers {
add (++pnum )};
if pname == nameOf (adrpagetable^.adrobject^) {
add (prefixEnd + "<b>" + ptitle + "</b>" + lineEnd)}
else {
add (prefixEnd + "<a href=\"" + pname + html.getpref ("fileextension") + "\">");
add ( linkStart + ptitle + linkEnd + "</a>" + lineEnd)}}};
window.msg ("");
return (ttr)};
html.data.adrpagetable = @websites.["#data"];
webbrowser.displaytext( wmPages ("guides"))
Go back to the main page for this script