Hi David,
why are the (Snippet)IDs in the TOC files, but no IDs in the snippet files itself?
are those IDs unique?
is there a certain "formular" which is used to create them? I got some 9 digit, 10 digit, and so on ID, but for sure not so many snippets.
The
ID attribute in every TOC entry is a basically random number that is unique throughout the project. Every TOC node gets such an internal ID when it is created and keeps this ID over its entire lifetime. The IDs are used to track multi-user changes in the TOC and to compare and update language siblings. These IDs only refer to TOC entries, they have nothing to do with topic XML files. If a TOC node is missing an internal ID, Help+Manual assigns one. If there is a duplicate ID within a project, it's auto-corrected when you open this project (with a warning message). Remember: a missing or wrong ID is not a big deal, they are required to track multi-user changes and changes in language siblings by the Synchronize function in H+M and the Translation Assistant.
What is the version entry for (Snippet files) and why is it always 2?
That's the XML schema version. Note that when you edit a topic with a newer version of H+M (which introduces an XML schema update), the edited topic receives the newer version. But unaltered topics that have not been modified for years still bear the old version flag. They are generally compatible with newer versions but when edited with an older version of Help+Manual, the software might issue a warning about possible data loss.
Would it be possible to add some more content the snippet xml? a unique ID, a language marker and a state integer?
The ID of a snippet is the file name without extension. Same for topic files. There is no additional ID in the snippet or topic files, it's only the file name and this must be unique throughout a project. Topics may contain an additional time stamp when the topic was last edited. We have implemented that a couple of years ago to keep track of chronological changes (e.g. when comparing language siblings). Before that, we relied on the time stamp of the topic file. But when using version control systems, this is not a reliable indicator, as these systems may change the file time stamp at their own discretion.
As for the language, what do you need this for? Help+Manual assumes 1 language per project. The project language is stored in the .HMXP file configuration and when you publish HTML, the language marker is exported with the HTML file. If every topic had its own language marker, that could be rather confusing. Especially if you change the project language later on. The project language really only matters for CHM files and PDF, as these file formats are not (or not fully) Unicode capable. In Help+Manual itself, you don't notice any difference whether you enter English text or Greek, because it's all Unicode. For Webhelp, the language is additional information for Google & co.
Regarding the
state integer - what would that be? Topic status is not part of the topic XML file, it's assigned on top of that in the help project file list. Same for the build tags.
Custom Meta Tags in Topics
That said, you can have as many
meta tags in a topic or snippet as you want. Help+Manual does in fact write <meta> tags if you (a) add a topic description and/or (b) assign a feature image. That information ends up as <meta> tags in the topic.
Code: Select all
<topic template="Default" modified="2025-09-29T17:13:49.437Z" lasteditedby="Alexander" version="2">
<title>New Topic</title>
<meta name="DESCRIPTION" translate="true" value="Topic Description is a <meta> tag. Feature image, too!" />
<meta name="PICTURE" translate="true" value="690839.jpg" />
<body>
<header>
<para styleclass="Heading1">New Topic</para>
</header>
<para styleclass="Normal">Enter topic text here.</para>
</body>
</topic>
You can add your own <meta> tags here. Help+Manual will
read and preserve them when changing the topic. There is just no visual editing option for additional meta tags, except the XML editor.
Example:
Code: Select all
<meta name="DESCRIPTION" translate="true" value="Topic Description is a <meta> tag. Feature image, too!" />
<meta name="PICTURE" translate="true" value="690839.jpg" />
<meta name="MYMETA" value="Hello world!" />
If you would like to use such a topic meta tag in the output, you can refer to it with a custom variable: <%TOPICMETA:NAME%>. This is both possible in the topic directly or in the topic HTML template that is used to export the topic.
You do not have the required permissions to view the files attached to this post.