<% // *** // * This template is described as a tutorial in HelpNDoc's help file // *** // Variable declarations var // List of topics available in the current project aTopicList: THndTopicsInfoArray; // 4. Current topic index nCurTopic: Integer; // 8. Topic level nTopicLevel: integer; // Main program begin // 1. Output BOM for HTML UTF8 files HndGeneratorInfo.BOMOutput := True; // 2. Instruct the generator to generate the desired output file HndGeneratorInfo.CurrentFile := ExtractFileName(HndGeneratorInfo.OutputFile); // 3. Get the list of topics available aTopicList := HndTopics.GetTopicListVisible(False); %> <% print(HTMLEncode(HndProjects.GetProjectTitle())); %> <% // 5. Loop through all the topics for nCurTopic := 0 to length(aTopicList) - 1 do begin // 6. Notify about the topic being generated HndGeneratorInfo.CurrentTopic := aTopicList[nCurTopic].id; // 9. Add an anchor to be able to link to that topic printf('', [aTopicList[nCurTopic].helpid]); // 10. Get the topic level nTopicLevel := HndTopics.GetTopicLevel(HndGeneratorInfo.CurrentTopic); // 11. Add the topic title printf('%s', [nTopicLevel, HndTopics.GetTopicHeaderTextCalculated(HndGeneratorInfo.CurrentTopic), nTopicLevel]); // 7. Output the topic content print(HndTopics.GetTopicContentAsHtml(HndGeneratorInfo.CurrentTopic)); end; %> <% end. %>