<% var aTopicList: THndTopicsInfoArray; var nCurTopic, nHeaderKind, nFooterKind: integer; var sTopicHeader, sTopicFooter, sTopicContent: string; var sPrevId, sNextId: string; // Returns the description of the topic function GetTopicDescription: string; begin // Get value Result := HndTopics.GetTopicDescription(HndGeneratorInfo.CurrentTopic); // Empty ? Use project's description instead if (Result = '') then Result := HndProjects.GetProjectSummary; end; begin // Output global CSS content HndGeneratorInfo.CurrentFile := 'css\hnd.css'; print(HndProjects.GetProjectCssContent()); // Clear search data HndJsSearchEngine.ClearSearchData(); // 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; // 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); // Topic content sTopicContent := HndTopics.GetTopicContentAsHtml(HndGeneratorInfo.CurrentTopic); // Previous and next topics sPrevId := HndTopicsEx.GetTopicPreviousGenerated(HndGeneratorInfo.CurrentTopic, True); sNextId := HndTopicsEx.GetTopicNextGenerated(HndGeneratorInfo.CurrentTopic, True); // Add Search data HndJsSearchEngine.AddSearchData( sTopicHeader, HndGeneratorInfo.CurrentTopic ); HndJsSearchEngine.AddSearchData( HndUtils.HtmlToText(sTopicContent), HndGeneratorInfo.CurrentTopic ); HndJsSearchEngine.AddSearchData( sTopicFooter, HndGeneratorInfo.CurrentTopic ); %> <% print(HTMLEncode(HndTopics.GetTopicCaption(HndGeneratorInfo.CurrentTopic))); %>
<% print(HTMLEncode(HndTopics.GetTopicHeaderTextCalculated(HndGeneratorInfo.CurrentTopic))); %>
home <% if ((sPrevId <> '') and (sPrevId <> HndTopics.GetProjectTopic())) then begin %> <% print(HTMLEncode(HndTopics.GetTopicCaption(sPrevId))); %> <% end; %>
<% if sNextId <> '' then begin %>
<% print(HTMLEncode(HndTopics.GetTopicCaption(sNextId))); %>
<% end; %>
<% end; // Output JS Search engine data HndGeneratorInfo.CurrentFile := 'js\hndsd.js'; print(HndJsSearchEngine.GetJsData()); // Clear the search engine HndJsSearchEngine.ClearSearchData(); end. %>