Adding a link to a file based on topic name

This is the place to discuss Help & Manual 4 issues. Please don't post questions on any other versions here!

Moderators: Alexander Halser, Tim Green

Post Reply
Geoff Robinson
Posts: 4
Joined: Wed Feb 14, 2007 2:34 pm

Adding a link to a file based on topic name

Unread post by Geoff Robinson »

Hi Everyone,

We use H&M4 to produce help files for our system using the browser based help output option. We want to add a link to a pdf file which the user can replace with a pdf of their own giving specific procedures applicable to them. Each pdf will be based on the topic header title

So for example we have a topic header called "menu option1" and it needs to link to a pdf called "menu option 1.pdf"

I've tried to use <%TOPIC_HEADER_TEXT%> like this

<p class="p_Banner"><a href="<%TOPIC_HEADER_TEXT%>.pdf" target="_blank"><img src="user defined help button.png" width="136" height="46" border="0" alt=""></a></p>

but when H&M creates the page it adds a non break space id on the end of the filename to give "menu option 1 &nbsp;.pdf" which fails to find the file.

Is there a way to
remove the nbsp
or use another variable
or can it be done in version 7

Thanks

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

Re: Adding a link to a file based on topic name

Unread post by Tim Green »

Hi Geoff,

Part of the problem here is that you are using filenames containing spaces, which are essentially invalid in an HTML-based system. So even without the nbsp you would probably get an error. If you change the name to eliminate spaces and also any other special characters that might cause problems in HTML it should work fine. (You may also need to eliminate the 1 directly before the dot, but I'm no longer 100% certain about that in HM4.)
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