<% var aTopicList: THndTopicsInfoArray; nCurTopic, nHeaderKind, nFooterKind: integer; sTopicHeader, sTopicFooter: string; oEditor: TObject; sPrevId, sNextId: string; begin // Output global CSS content HndGeneratorInfo.CurrentFile := 'css\hnd.css'; print(HndProjects.GetProjectCssContent()); // Clear search data HndJsSearchEngine.ClearSearchData(); // Create the temp editor oEditor := HndEditor.CreateTemporaryEditor(); // Each individual topics... aTopicList := HndTopics.GetTopicList(False); for nCurTopic := 0 to length(aTopicList) - 1 do begin // Notify about the topic being generated HndGeneratorInfo.CurrentTopic := aTopicList[nCurTopic].id; // Setup the file name HndGeneratorInfo.CurrentFile := HndTopics.GetTopicHelpId(HndGeneratorInfo.CurrentTopic) + '.html'; // Topic header nHeaderKind := HndTopics.GetTopicHeaderKind(HndGeneratorInfo.CurrentTopic); sTopicHeader := HndTopics.GetTopicHeaderTextCalculated(HndGeneratorInfo.CurrentTopic); // Topic footer nFooterKind := HndTopics.GetTopicFooterKind(HndGeneratorInfo.CurrentTopic); sTopicFooter := HndTopics.GetTopicFooterTextCalculated(HndGeneratorInfo.CurrentTopic); // Previous and next topics sPrevId := HndTopics.GetTopicPrevious(HndGeneratorInfo.CurrentTopic); sNextId := HndTopics.GetTopicNext(HndGeneratorInfo.CurrentTopic); // Add Search data HndEditor.Clear(oEditor); HndEditor.InsertTopicContent(oEditor, HndGeneratorInfo.CurrentTopic); HndEditor.ReplaceLibraryItems(oEditor); HndJsSearchEngine.AddSearchData(sTopicHeader, HndGeneratorInfo.CurrentTopic); HndJsSearchEngine.AddSearchData(HndEditor.GetContentAsText(oEditor), HndGeneratorInfo.CurrentTopic); HndJsSearchEngine.AddSearchData(sTopicFooter, HndGeneratorInfo.CurrentTopic); %> <% print(HTMLEncode(HndTopics.GetTopicCaption(HndGeneratorInfo.CurrentTopic))); %>
<% if ((sPrevId <> '') and (sPrevId <> HndTopics.GetProjectTopic())) then begin %> <% print(HTMLEncode(HndTopics.GetTopicCaption(sPrevId))); %> <% end else begin %> Home <% end; %>

<% print(HTMLEncode(HndTopics.GetTopicHeaderTextCalculated(HndGeneratorInfo.CurrentTopic))); %>

<% if sNextId <> '' then begin %> <% print(HTMLEncode(HndTopics.GetTopicCaption(sNextId))); %> <% end; %>
<% print(HndTopics.GetTopicContentAsHtml(HndGeneratorInfo.CurrentTopic)); %>
Home <% if nFooterKind <> 2 then begin %>

<% print(HTMLEncode(sTopicFooter)); %>

<% end; %>
<% end; // Output JS Search engine data HndGeneratorInfo.CurrentFile := 'js\searchdata.js'; print(HndJsSearchEngine.GetJsData()); // Free the editor HndEditor.DestroyTemporaryEditor(oEditor); // Clear the search engine HndJsSearchEngine.ClearSearchData(); end. %>