You can import topics and XML topic files to the current topic from the current project, from other Help+Manual projects and from libraries of Help+Manual XML files. You can either overwrite the entire current topic with the external file using Load Topic from File or you can insert the external file in the current topic with the Snippets tool.
You can also copy and paste topics and chapters from other projects in the same way as within your current project.
Use Snippets to build up a collection of pre-formatted text blocks and topics that you and your team use frequently! Just copy the XML topic files you want to use to a folder for storage.
The Snippets tool inserts topics and H+M XML files into your current topic at the cursor position. These topics can be inserted in Copy mode or Link mode. In Link mode the snippet content updates automatically when the source topic or XML file is edited.
The topics can be in your current project, another Help+Manual project (HMXP format, Professional and Server versions only) or a directory of H+M XML files.
1.Click in your topic where you want to insert the snippet.
2.Select the Snippet tool in Write > Insert Object.
3.Choose From Topic to insert a topic from the current project or From File to insert an external H+M XML file or an XML topic file from another project.
•Copy & Paste inserts a copy of the file that you can then edit.
•Linked creates a live link to the file – changes in the source file or topic are updated automatically.
•Deselecting Snippet creates a new paragraph allows you to insert a snippet as inline text in an existing paragraph.
•You can also insert XML files from your current project instead of using the From Topic mode (HMXP format, Professional and Server versions only).
4.Select the topic or file you want to insert and click on OK to insert it.
"Use project search path to locate snippet"
This option adds the location of the snippet file to the project search path – if you deselect it the path to the snippet is stored with the snippet.
Rather than using snippets from many locations it is better to store all your snippet files in a common location. This will make them easier to manage, particularly if you ever need to move your project or have it translated.
You can insert snippets from any location. However, if you use linked snippets from many locations the links will be dead if you move your project or send it to someone by email. You can solve this problem by storing your snippet files together with your project in a special directory. Alternatively, you can store and edit your snippets in their own uncompressed Help+Manual project, or in a special Help+Manual project known as a style repository:
See this topic for more information on working with and managing snippets.
Snippets managed in a snippet folder:
1.Create a folder for your snippets in a location where you can easily transport it together with your project folder.
2.Add the path to the snippets folder to your Project Search Path in your project's Configuration > Common Properties settings.
3.When you insert a snippet select the Project Search Path option to tell Help+Manual to look for the snippet files in the folders listed in the Project Search Path.
When you do this you can always move your snippets folders to any location you like. To get Help+Manual to find the snippets you just need to add the new location to your Project Search Path.
Snippets managed in a project:
Create an uncompressed Help+Manual project using the HMXP format (Pro and Server versions only). Then save your snippets directly in the /Topics folder of that project. You can then edit the snippet files in that project in the Project Files > Topic Files section in the Project Explorer.
Snippets managed in a style repository:
See Working with Style Repositories for instructions on this option.
You can export selected text or the current topic to an external XML file, for example for use as a snippet in a snippet directory.
Export the entire topic:
1.Select the topic you want to export in the Project Explorer (TOC or Topic Files).
2.Select File > Save Topic to File in Project > Manage Topics and choose the save location.
Export selected text:
Select text in the editor – the text can include anything that a topic can contain, i.e. also images, tables, etc.
Select File > Save Snippet in Project > Manage Topics and choose a save location and a filename.
Formatting with styles:
If the text in snippets is formatted with styles the styles must be defined in the present project. If the styles are not defined the snippets text will be displayed unformatted. If you use standard style names in all your projects your snippets will be reformatted automatically to match the styles of the current project.
Snippets in style repositories come with their own styles:
Style repositories are used as a source for styles for multiple projects. If you use snippets from a style repository the styles used in the repository are automatically imported to your project, so you don't have to worry about the styles issue. See Working with Style Repositories for details on working with repositories.
If the text in your snippets files is manually formatted it will be displayed normally in the current project. It is generally better to use manual formatting if you want the formatting of the snippets to look identical wherever they are used.
You can load entire topics from external files. Unlike snippets, loading a topic from a file replaces the entire current topic with the external file. You can load topics from RTF, HTML, TXT and Help+Manual XML topic files.
1.Select the topic you want to overwrite in the Project Explorer (TOC or Topic Files), or create a new empty topic.
2.Select File > Load Topic from File in Project > Manage Topics and select the file you want to load. This will overwrite the current topic with the contents of the selected file!
See Content templates for topics for information on using Help+Manual XML topic files as content templates for topics.
In HTML-based output formats you can also use the #MERGE command to merge the contents of external HTML files into your topics when you publish your project. This enables you to maintain external files for information that may change and insert the latest version automatically every time you publish.
See Merging HTML files into topics for full details and instructions.
1.Open both projects in the Project Explorer. Alternatively you can open Help+Manual a second time and open one project in on instance of the program and the other project in the other. This can make it easier to switch between projects.
2.Select the source and target positions in both projects so that you can see them clearly.
3.Use the Copy, Cut and Paste tools in the Ribbon Toolbar to copy and paste topics or chapters. These Clipboard tools are available in both the Write and Project tabs.
If the pasted topics have the same IDs as topics in the target project H+M will change them automatically. It's advisable to open the Topic Options tab on the left of the main editor window and check the IDs of all pasted topics after importing them.