<%
// Topics
nBlocLevel := 0;
for nCurTopic := 0 to length(aTopicList) - 1 do
begin
HndGeneratorInfo.CurrentTopic := aTopicList[nCurTopic].id;
nTopicKind := aTopicList[nCurTopic].Kind;
nCurTopicLevel := HndTopics.GetTopicLevel(HndGeneratorInfo.CurrentTopic);
nCurTopicChildrenCnt := HndTopicsEx.GetTopicDirectChildrenCountGenerated(HndGeneratorInfo.CurrentTopic, True);
// Topic URL
if nTopicKind = 1 then sTopicUrl := '_empty.html' // Empty
else sTopicUrl := format('%s.html', [aTopicList[nCurTopic].HelpId]); // Normal topic
// Close the previous topics
if ((nCurTopic > 0) and (nCurTopicLevel < HndTopics.GetTopicLevel(aTopicList[nCurTopic - 1].id))) then
begin
nDif := HndTopics.GetTopicLevel(aTopicList[nCurTopic - 1].id) - nCurTopicLevel;
for nClose := 0 to nDif - 1 do
begin
print('
', [nBlocLevel]);
printfln('%s', [sTopicUrl, HTMLEscape(aTopicList[nCurTopic].caption)]);
if (nCurTopicChildrenCnt > 0) then nBlocLevel := nBlocLevel + 1
else println('
');
// Close the last topic
if (HndTopicsEx.GetTopicNextGenerated(HndGeneratorInfo.CurrentTopic, True) = '') then
begin
while nBlocLevel > 0 do
begin
print('');
nBlocLevel := nBlocLevel - 1;
end;
end;
end;
%>
<%
end.
%>