<% var aTopicList: THndTopicsInfoArray; var aKeywordList: THndKeywordsInfoArray; var nBlocLevel: integer = 0; var nCurTopic, nTopicKind, nCurTopicLevel, nDif, nClose, nCurTopicChildrenCnt, nCurTopicIcon: integer; var nCurKeyword, nCurKeywordLevel, nCurKeywordChildrenCnt, nCurKeywordTopic: integer; var sTopicUrl, sCurrentKeyword, sTopicClass, sTopicIconData, sKeywordClass, sKeywordLink, sKeywordOnClick, sKeywordOnCData: string; var aAssociatedTopics: array of string; // Return the topic extension, starting with a dot function GetTopicExtension: string; begin Result := Trim(HndGeneratorInfo.TemplateInfo.TopicExtension); if ((Length(Result) > 0) and (Result[1] <> '.')) then Result := '.' + Result; end; begin // Need BOM for UTF8 files HndGeneratorInfo.BOMOutput := True; HndGeneratorInfo.CurrentFile := 'toc' + GetTopicExtension(); %> <% print(HTMLEncode(HndProjects.GetProjectTitle())); %> - Table of Contents
<% // --- Table of contents TAB --- // if HndGeneratorInfo.GetCustomSettingValue('TocShow') then begin %>
'); nBlocLevel := nBlocLevel - 1; end; end; // Topic class if nCurTopicChildrenCnt > 0 then sTopicClass := 'folder' else sTopicClass := ''; // Topic icon if nCurTopicIcon > -1 then sTopicIconData := 'icon: ''' + IntToStr(nCurTopicIcon) + '.png''' else sTopicIconData := ''; %>
  • <% print(HTMLEncode(aTopicList[nCurTopic].caption)); %> <% if (nCurTopicChildrenCnt > 0) then begin print('
      '); nBlocLevel := nBlocLevel + 1; end else begin print(''); end; // 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; // --- Keywords TAB --- // if HndGeneratorInfo.GetCustomSettingValue('TocKeywordsShow') then begin %>
    '); nBlocLevel := nBlocLevel - 1; end; end; // Keyword class if nCurKeywordChildrenCnt > 0 then sKeywordClass := 'folder' else sKeywordClass := 'file'; %>
  • <% print(aKeywordList[nCurKeyword].caption);%> <% if (nCurKeywordChildrenCnt > 0) then begin print('
      '); nBlocLevel := nBlocLevel + 1; end else begin print(''); end; // Close the last keyword if (HndKeywords.GetKeywordNext(sCurrentKeyword) = '') then begin while nBlocLevel > 0 do begin print('
  • '); nBlocLevel := nBlocLevel - 1; end; end; end; %>
    <% end; // --- Search TAB --- // if HndGeneratorInfo.GetCustomSettingValue('TocSearchShow') then begin %> <% end; %>
    <% end. %>