Possibility to user variables or conditions in the help title?

Please post all questions on Help+Manual 8 here

Moderators: Alexander Halser, Tim Green

Post Reply
LeenaHaapoja
Posts: 7
Joined: Mon Oct 19, 2020 10:45 am

Possibility to user variables or conditions in the help title?

Unread post by LeenaHaapoja »

Hi, I have a need to publish 3 slightly different .docx outputs from the same H+M project. I'm using conditions in the content, and now we have a need to publish the content as Word documents with different pieces of text depending on the respective part of the product. I have created a Word template based on one of the H+M Word templates, and it is working just fine. The only thing is that I have to publish the same content with different conditions 3 times, and manually add the certain title of the "subproduct" to the cover page of the Word document. Or then change the help title every time when publishing one of the documents.

Is there any way in H+M to use variables or conditions in the help title to be able to publish a document for certain audiences from the same reusable content at one go? I would appreciate for any tips here :)
User avatar
julio
Posts: 118
Joined: Wed May 28, 2008 12:06 am
Location: Porto Alegre, RS - Brasil
Contact:

Re: Possibility to user variables or conditions in the help title?

Unread post by julio »

Hi,

We have a situation that may fit your needs: we have two products, one is the base product and the other one uses that base product and adds some specifics. I have then created two custom builds, PRODUCT_ONE and PRODUCT_TWO. If a feature belongs only to one product, texts are enclosed by their respective build. If texts are not bound to any product (they can be used on both products), there is no need to enclose texts with any build.
When we have a situation where we must differentiate, for example, the name of the product in the output, such as:

Code: Select all

Product is used in the following situations: situation one, situation two...
Those "product" and "situation" texts can be replaced by a variable, such as:

Code: Select all

<%PRODUCT_NAME%> is used in the following situations: <%PRODUCT_SITUATIONS%>...
Then these variables are defined in HMSKIN files for each product, product_one.hmskin and product_two.hmskin in this case. In the command line used to build each product, the respective skin file is used:

Code: Select all

helpman.exe "common_project.hmxp" /I=PDF,PRODUCT_ONE /PDF="product_one.pdf" /O="product_one.hmskin"

helpman.exe "common_project.hmxp" /I=PDF,PRODUCT_TWO /PDF="product_two.pdf" /O="product_two.hmskin"
This is flexible enough to add more products if needed, because you only have to define a new skin with values to those variables.
LeenaHaapoja
Posts: 7
Joined: Mon Oct 19, 2020 10:45 am

Re: Possibility to user variables or conditions in the help title?

Unread post by LeenaHaapoja »

Thanks Julio, but my question concerns the Word output.
User avatar
Tim Green
Site Admin
Posts: 23181
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Possibility to user variables or conditions in the help title?

Unread post by Tim Green »

Hi Leena,
Is there any way in H+M to use variables or conditions in the help title to be able to publish a document for certain audiences from the same reusable content at one go? I would appreciate for any tips here
You can't use conditions in the Word template but you can get around this by using a user-defined variable and redefining it with a publishing task.
  1. Define a variable of your own for the title in the project -- don't use the standard variable when you are going to be redefining it. Set the value to the version you publish most often.
  2. Then use the Publishing Task Manager to define a task with one action each for the other versions. In each action you can redefine variables to be used. See the linked chapter in the help to see how this is done.
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.
User avatar
julio
Posts: 118
Joined: Wed May 28, 2008 12:06 am
Location: Porto Alegre, RS - Brasil
Contact:

Re: Possibility to user variables or conditions in the help title?

Unread post by julio »

My suggestion works for any type of output, PDF was just an example.
LeenaHaapoja wrote: Wed Dec 02, 2020 1:34 pm Thanks Julio, but my question concerns the Word output.
LeenaHaapoja
Posts: 7
Joined: Mon Oct 19, 2020 10:45 am

Re: Possibility to user variables or conditions in the help title?

Unread post by LeenaHaapoja »

I have tested now, and it is working as it should. Thanks Tim & Julio for your valuable tips!
Post Reply