Home: Tip of The Day: Outputting Documentation: 
Tip of The Day - Outputting Documentation

First load the documentation for the book that you want

set $Book="Unity Server Documentation";
set $Documentation=$Command.CreateTableQuery(DO_DOC_TOPIC)
.AddColumn(BOOK)
.AddEqualityConstraint(BOOK,$Book)
.AddColumn(CONTENT)
.AddColumn(PARENT_TOPIC)
.AddColumn(TOPIC)
.AddColumn(SORTING)
.AddOrderBy(TOPIC)
.ExecuteTableQuery()
.PropertyAlaisAndEndKeeper(TITLE,TOPIC,"->");

Then we output the documentation:

set $ThisPageName="Test";
forevery($Document,$Documentation)
{
subpage($Document.TOPIC.Replace("->","/"))
{ <h1>$Document.TOPIC.Replace("->",":&nbsp;");
</h1>
<br><br>
forevery($Links,$Documentation
.SubsetOnEquality(PARENT_TOPIC,$Document.TOPIC))
{ pagelink($ThisPageName+"/"+$Links.TOPIC.Replace("->","/"),
$Links.TITLE);
<br>
}
<br>
$Document.CONTENT.GetStringHtmlEscapeIncoded()
.ReplaceNewLineWith("<br>");

}
pagelink($ThisPageName+"/"+$Document.TOPIC.Replace("->","/"),
$Document.TITLE);<br>
}

Download  |  Tutorial  |  Documentation  |  Pricing  |  Contact