<% var aTopicList: THndTopicsInfoArray; nCurTopic, nCurParent, nCurKeyword, nTopicKind, nHeaderKind, nFooterKind: integer; sTopicHeader, sTopicFooter, sRelativeTopic: string; oEditor: TObject; aBreadCrumb: array of String; aTopicKeywords: array of string; begin // Need BOM for UTF8 files HndGeneratorInfo.BOMOutput := True; // Output global CSS content HndGeneratorInfo.CurrentFile := 'css\hnd.css'; print(HndProjects.GetProjectCssContent()); // Create the temp editor oEditor := HndEditor.CreateTemporaryEditor(); // Each individual topics... aTopicList := HndTopicsEx.GetTopicListGenerated(False, False); for nCurTopic := 0 to length(aTopicList) - 1 do begin // Notify about the topic being generated HndGeneratorInfo.CurrentTopic := aTopicList[nCurTopic].id; // Topic kind nTopicKind := HndTopics.GetTopicKind(HndGeneratorInfo.CurrentTopic); if (nTopicKind = 1) then continue; // Empty topic: do not generate anything // Setup the file name HndGeneratorInfo.CurrentFile := aTopicList[nCurTopic].HelpId + '.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); // Add Search data HndEditor.Clear(oEditor); HndEditor.InsertTopicContent(oEditor, HndGeneratorInfo.CurrentTopic); HndEditor.ReplaceLibraryItems(oEditor); // Create the breadcrumb SetLength(aBreadCrumb, 0); if HndGeneratorInfo.GetCustomSettingValue('ShowBreadCrumbs') then begin sRelativeTopic := HndTopics.GetTopicParent(HndGeneratorInfo.CurrentTopic); while (sRelativeTopic <> '') and (sRelativeTopic <> HndTopics.GetProjectTopic()) do begin SetLength(aBreadCrumb, Length(aBreadCrumb) + 1); aBreadCrumb[Length(aBreadCrumb) - 1] := sRelativeTopic; sRelativeTopic := HndTopics.GetTopicParent(sRelativeTopic); end; end; // Associated Keywords aTopicKeywords := HndTopicsKeywords.GetKeywordsAssociatedWithTopic(HndGeneratorInfo.CurrentTopic); %> <% print(HTMLEncode(HndTopics.GetTopicCaption(HndGeneratorInfo.CurrentTopic))); %> <% if nHeaderKind <> 2 then begin %>

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

<% if Length(aBreadCrumb) > 0 then begin %>
<% for nCurParent := Length(aBreadCrumb) - 1 downto 0 do begin // Empty topic if (HndTopics.GetTopicKind(aBreadCrumb[nCurParent]) = 1) then begin printf('%s ›› ', [HTMLEncode(HndTopics.GetTopicCaption(aBreadCrumb[nCurParent]))]); end // Normal topic else begin printf('%s ›› ', [HndTopics.GetTopicHelpId(aBreadCrumb[nCurParent]), HTMLEncode(HndTopics.GetTopicCaption(aBreadCrumb[nCurParent]))]); end; end; %>
<% end; %>
<% if HndGeneratorInfo.GetCustomSettingValue('ShowNavigation') then begin %>
<% sRelativeTopic := HndTopics.GetTopicParent(HndGeneratorInfo.CurrentTopic); if (sRelativeTopic <> '') and (sRelativeTopic <> HndTopics.GetProjectTopic()) then begin %> Parent <% end; sRelativeTopic := HndTopicsEx.GetTopicPreviousGenerated(HndGeneratorInfo.CurrentTopic, False); if (sRelativeTopic <> '') and (sRelativeTopic <> HndTopics.GetProjectTopic()) then begin %> Previous <% end; sRelativeTopic := HndTopicsEx.GetTopicNextGenerated(HndGeneratorInfo.CurrentTopic, False); if (sRelativeTopic <> '') and (sRelativeTopic <> HndTopics.GetProjectTopic()) then begin %> Next <% end; %>
<% end; %>
<% end; %>
<% print(HndTopics.GetTopicContentAsHtml(HndGeneratorInfo.CurrentTopic)); %>
<% if nFooterKind <> 2 then begin %> <% end; %> <% end; // Free the editor HndEditor.DestroyTemporaryEditor(oEditor); end. %>