<% var sProjectTitle, sDefaultTopicId: 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 := ExtractFileName(HndGeneratorInfo.OutputFile); sProjectTitle := HndProjects.GetProjectTitle(); // Try to get the default topic sDefaultTopicId := HndProjects.GetProjectDefaultTopic(); // None defined: the first one is the default topic if (sDefaultTopicId = '') then sDefaultTopicId := HndTopicsEx.GetTopicNextGenerated(HndTopics.GetProjectTopic(), False); if (sDefaultTopicId <> '') then sDefaultTopicId := HndTopics.GetTopicHelpId(sDefaultTopicId); %> <% print(HTMLEncode(sProjectTitle)); %> <% end. %>