Build options and footers in a template

Please post all questions and comments regarding Help & Manual 7 here.

Moderators: Alexander Halser, Tim Green

Post Reply
jabramoff
Posts: 27
Joined: Sun Aug 05, 2018 12:55 pm

Build options and footers in a template

Unread post by jabramoff »

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.
User avatar
Tim Green
Site Admin
Posts: 23153
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Build options and footers in a template

Unread post by Tim Green »

Hi Jabra,
Is it possible to apply build options to template content?
Absolutely. You need to get the original tag name of the condition and use that as follows:

Code: Select all

<IF_TAGNAME> content goes here </IF_TAGNAME>
<IFNOT_TAGNAME> content goes here </IFNOT_TAGNAME>
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.
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.
jabramoff
Posts: 27
Joined: Sun Aug 05, 2018 12:55 pm

Re: Build options and footers in a template

Unread post by jabramoff »

Awesome. Thanks, Tim.

I did try searching the H+M Help, but the relevant Help pages did not appear in the results.
jabramoff
Posts: 27
Joined: Sun Aug 05, 2018 12:55 pm

Re: Build options and footers in a template

Unread post by jabramoff »

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
User avatar
Tim Green
Site Admin
Posts: 23153
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Build options and footers in a template

Unread post by Tim Green »

Hi Jay,
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.
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.

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.
jabramoff
Posts: 27
Joined: Sun Aug 05, 2018 12:55 pm

Re: Build options and footers in a template

Unread post by jabramoff »

Sounds good.

Thanks again, Tim.
FrancesCor
Posts: 1
Joined: Mon Mar 25, 2019 10:38 am

Re: Build options and footers in a template

Unread post by FrancesCor »

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
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.
Last edited by FrancesCor on Sat Feb 03, 2024 6:40 pm, edited 2 times in total.
User avatar
Tim Green
Site Admin
Posts: 23153
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Build options and footers in a template

Unread post by Tim Green »

Hi Frances,
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.
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.

  1. 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).
  2. 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.
  3. Select Insert Text Snippet in the Insert menu to insert a box for the snippet.
  4. 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.
  5. Set the anchors to Left, Right, Top, Bottom and "Anchor to margins" and click on OK to insert.
  6. With the mouse adjust the borders of the snippet box to the margins of the page.
You will not see the contents of the snippet until you publish the PDF with your project. The contents of the selected topic file will be inserted in the snippet box on publishing.
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.
Post Reply