Build options and footers in a template
Moderators: Alexander Halser, Tim Green
Build options and footers in a template
Hello.
Is it possible to apply build options to template content?
We place part numbers and document titles in footers and the I'd like for the build option to determine the part number and the product name in the document title.
Thank you.
Is it possible to apply build options to template content?
We place part numbers and document titles in footers and the I'd like for the build option to determine the part number and the product name in the document title.
Thank you.
- Tim Green
- Site Admin
- Posts: 23189
- Joined: Mon Jun 24, 2002 9:11 am
- Location: Bruehl, Germany
- Contact:
Re: Build options and footers in a template
Hi Jabra,
See this page in the help for details:
https://helpandmanual.com/help/index.ht ... itions.htm
Important: If you're using a skin you need to edit the templates in the skin, not in your project, since the skin templates replace the project ones. Also, there are certain restrictions if you are using V3 skins from the Premium Pack. Specifically, you can't use topic-based variables in the page template because the topic content is replaced dynamically, without replacing the entire page.
Absolutely. You need to get the original tag name of the condition and use that as follows:Is it possible to apply build options to template content?
Code: Select all
<IF_TAGNAME> content goes here </IF_TAGNAME>
<IFNOT_TAGNAME> content goes here </IFNOT_TAGNAME>
https://helpandmanual.com/help/index.ht ... itions.htm
Important: If you're using a skin you need to edit the templates in the skin, not in your project, since the skin templates replace the project ones. Also, there are certain restrictions if you are using V3 skins from the Premium Pack. Specifically, you can't use topic-based variables in the page template because the topic content is replaced dynamically, without replacing the entire page.
Regards,
Tim (EC Software Documentation & User Support)
Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
Tim (EC Software Documentation & User Support)
Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
Re: Build options and footers in a template
Awesome. Thanks, Tim.
I did try searching the H+M Help, but the relevant Help pages did not appear in the results.
I did try searching the H+M Help, but the relevant Help pages did not appear in the results.
Re: Build options and footers in a template
Hi again.
I just noticed that the Help topic is for HTML templates. I'm not using an HTML template. I use the template for PDF output.
I tried using the IF tagging in a text label, but that didn't work.
Any further information would be appreciated.
Jay
I just noticed that the Help topic is for HTML templates. I'm not using an HTML template. I use the template for PDF output.
I tried using the IF tagging in a text label, but that didn't work.
Any further information would be appreciated.
Jay
- Tim Green
- Site Admin
- Posts: 23189
- Joined: Mon Jun 24, 2002 9:11 am
- Location: Bruehl, Germany
- Contact:
Re: Build options and footers in a template
Hi Jay,
If you use the option to reference a topic ID with the snippet tool in Manual Designer you can also have a topic file with the same ID but different content in each project, so you insert custom content in the template automatically for each project. You then create the snippet file in Project Files > Topic Files, so that it does not have a TOC entry, and set its build options to PDF only so that it doesn't get exported to HTML-based formats invisibly.
If you don't need custom versions for each project you can create an external snippet XML file and use the same one for all projects. You then need to include the folder where it is stored in Configuration > Common Properties > Project Search Path in every project so that HM can find it when publishing. See this topic for information on managing snippets:
https://helpandmanual.com/help/index.ht ... ippets.htm
Sorry, but conditional tags are not currently supported in PDF templates. I thought you were referring to HTML. What you can do is use the Snippet function in the Insert menu in Manual Designer. The snippet -- which can be an independent XML snippet file created by Help+Manual or a topic in your project -- can then contain conditional tags and they will work on it in the template.jabramoff wrote:I just noticed that the Help topic is for HTML templates. I'm not using an HTML template. I use the template for PDF output.
If you use the option to reference a topic ID with the snippet tool in Manual Designer you can also have a topic file with the same ID but different content in each project, so you insert custom content in the template automatically for each project. You then create the snippet file in Project Files > Topic Files, so that it does not have a TOC entry, and set its build options to PDF only so that it doesn't get exported to HTML-based formats invisibly.
If you don't need custom versions for each project you can create an external snippet XML file and use the same one for all projects. You then need to include the folder where it is stored in Configuration > Common Properties > Project Search Path in every project so that HM can find it when publishing. See this topic for information on managing snippets:
https://helpandmanual.com/help/index.ht ... ippets.htm
Regards,
Tim (EC Software Documentation & User Support)
Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
Tim (EC Software Documentation & User Support)
Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
Re: Build options and footers in a template
Sounds good.
Thanks again, Tim.
Thanks again, Tim.
-
- Posts: 1
- Joined: Mon Mar 25, 2019 10:38 am
Re: Build options and footers in a template
Are there any tutorials on how to create such snippets by any chance, Tim? I figure that would be ideal for what I'm trying to do as well.jabramoff wrote: ↑Thu Mar 14, 2019 1:02 pm Hi again.
I just noticed that the rangefinders for hunting topic is for HTML templates. I'm not using an HTML template. I use the template for PDF output.
I tried using the IF tagging in a text label, but that didn't work.
Any further information would be appreciated.
Jay
Last edited by FrancesCor on Sat Feb 03, 2024 6:40 pm, edited 2 times in total.
- Tim Green
- Site Admin
- Posts: 23189
- Joined: Mon Jun 24, 2002 9:11 am
- Location: Bruehl, Germany
- Contact:
Re: Build options and footers in a template
Hi Frances,
Placing a snippet on a PDF template page with the text from the topic file you want to display is actually quite straightforward. The only restriction is that the topic must fit on a single page, because snippets cannot flow to a second page in the PDF template. If you want to have more than one page you must repeat the procedure with multiple pages and multiple snippets, one for each page.FrancesCor wrote:Are there any tutorials on how to create such snippets by any chance, Tim? I figure that would be ideal for what I'm trying to do as well.
- Create a topic file in Project Files > Topic Files (i.e. without a TOC entry) containing the formatted text you want to use. Set its include options so that it is only included in PDF. Make a note of its topic ID (look in the Topic Options tab on the left of the editor for this).
- In Manual Designer select the section where you want to insert the snippet and then select Insert Page in the Pages menu to insert a new page.
- Select Insert Text Snippet in the Insert menu to insert a box for the snippet.
- Select "Load Topic" as the snippet type and insert the topic ID of your topic file from step 1 as the source of the snippet.
- Set the anchors to Left, Right, Top, Bottom and "Anchor to margins" and click on OK to insert.
- With the mouse adjust the borders of the snippet box to the margins of the page.
Regards,
Tim (EC Software Documentation & User Support)
Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
Tim (EC Software Documentation & User Support)
Private support:
Please do not email or PM me with private support requests -- post to the forum directly.