Skip to main content
Inspiring
February 8, 2017
Question

Using predefined variables in pages (HTML)

  • February 8, 2017
  • 1 reply
  • 517 views

Are there predefined variables I can use in a page, like "this_page_name" or "this_chapter_name"?

Imagine I want to put comments into pages and make them conditional,

TODO: Hi, I am page "help.html"

Later, when I build the, say, printed documentation, with Build tag "TODO" switched ON, I will only get a list of pages which have a TODO section and its respective contents together with the name of the page.

Thanks,

Christoph

This topic has been closed for replies.

1 reply

Captiv8r
Legend
February 8, 2017

Hi there

Indeed there are variables as you are referring to. Unfortunately my crystal ball is on the fritz today and my psychic skills are as yet untapped so I'm unable to divine which version of RoboHelp you may be using.

I'm using version 2015 Release but I believe the same items are present in 2017 Release.

Click the Insert tab, then Field and a list of available fields should be presented.

Cheers... Rick

KrischuAuthor
Inspiring
February 9, 2017

It's RH9 I'm using. (I also have RH11 and 2015) but for compatibility reasons I'm bound to RH9 on this project.

And thanks, I found "Insert" and the "file"-Variable also in RH9.

As it seems, most of my pages are not bound to a condition. They contain some sections that are conditioned.

Is it possible to just output a portion of the page that is under a condition, say,if the contition is TODO, then just output:

<TODO> this file is "pagexy.html" please change image ...</TODO>

At the moment, even if I say

NOT this AND NOT that AND NOT PRINT and NOT old_stuff

I still get everything that is not under a conditional TAG.

Peter Grainge
Community Expert
Community Expert
February 9, 2017

The use of AND / OR can cause confusion where more than one tag is in a topic or applied to a whole topic. Take a look at Build Expressions on my site to see if that helps you.

I think you are trying to write an expression that would have the effect of only including something with the tag applied. Often it is easier to apply a tag to the rest of content to exclude that. Thus if I wanted only this paragraph in my output and it was a print output, I would apply a tag called say PRINTEXCLUDE to the first and third paragraphs and create an expression NOT PRINTEXCLUDE.

Hope that helps. I'm not 100% sure if I have followed what you want.


See www.grainge.org for RoboHelp and Authoring information

@petergrainge

Use the menu (bottom right) to mark the Best Answer or Highlight particularly useful replies. Found the answer elsewhere? Share it here.