Using TOC name as a variable?

Please post all questions on Help+Manual 8 here

Moderators: Alexander Halser, Tim Green

Post Reply
chris were
Posts: 5
Joined: Wed Feb 13, 2019 9:19 pm

Using TOC name as a variable?

Unread post by chris were » Tue Feb 11, 2020 3:25 am

(Yes, 8 is looking good!)

I would like to reference the table of contents I am publishing from. In fact I'd like to nest it, so that I set my <%TITLE%> to <%TOC_NAME%>, if there was such a thing.

My use case: I have after importing from another help system a tonne of topics in one project for multiple manuals, and I create additional TOCs for each manual. I know I can create separate project for each and assign a master/slave relation, setting the title in each master, but its a little convoluted and I had problems publishing this way, files too big (see my H&M7 post Re: CHM file size enourmously increased I have just updated).


User avatar
Tim Green
Site Admin
Posts: 21297
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany

Re: Using TOC name as a variable?

Unread post by Tim Green » Tue Feb 11, 2020 7:43 am

Hi Chris,

There isn't a variable that will give you the name of your current TOC. There is a trick you could use that would only work if you have topics in each TOC that only exist in that TOC. Then you store your TOC_NAME variable globally, and redefine it locally in the topic unique to each TOC, with the local variables option in the Topic Options for that topic. The downside is that it would only be valid in that topic, so it would have to be some kind of intro topic.
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