This content has been marked as final. Show 9 replies
Hi KEBarlow and welcome to our community
Lemme guess. You have a bookmark on each page that is labeled "Top" or something similar and you are attempting to link to that?
Here's a trick I always share with students in my RoboHelp HTML classes. There is absolutely no need to link this way. Linking to the top of the page couldn't be simpler. Just insert a pound symbol ( # ) where you would normally specify something like #Top.
Forot to mention that doing it this way, you also have no need for inserting the "Top" Bookmark. Since # means the page you are on, you omit the superflous step of creating the bookmark and when linking, point only to #. The end result is that the page simply reloads and redisplays from the beginning. Actually, this is a better result than you would have otherwise achieved. This is because if you linked to a bookmark, going back to the top is inconsistent. It displays the page scrolled just a fuzz to position the bookmark.
thanks for your quick reply. Unfortunately I have tried doing it both that way and with an explicit bookmark. I get the same result with both. With no bookmark and just # as the target, it still amends it to ../# in the topics in sub-folders. If I manually change this back to just # in those topics, I then get the standard message asking me if I want to detach teh topic from t eh template or make this change to the template as well. If I select to make it to the template too, it changes the link in the template to [sub-folder]/#, which is then incorrect for any topics not in the same sub-folder.
Hi again KEBarlow
While editing the template, remove the footer text. Click Insert > Advanced > Script...
Type document.write('<a href="#">Back to top<\/a>') into the Source field and click OK
Apply the template to all topics.
Hopefully this helps... Rick
Seems like the solution you discounted in your original post, "create a different version of the template for each folder in the topic structure," is the simplest one. I'm not sure why you'd "rather not have to advise them" to do this, unless your organization has some serious political or cultural issues.
Two other things:
1) How is the href="#" link affected by its folder placement? I just looked at a topic that sits inside a "mergedProjects - Installation" folder in merged WebHelp, and it remains the same as when I inserted it.
2) if you're generating WebHelp, take a look at how many .js files RH places in the output folder(s).
some of the authors are new to online help and don't have much HTML or Robohelp experience. I'm worried that asking them to create new templates and link some topics to one template and some to another would lead to problems. For example, if they create a topic in one sub-folder and then later decide to move it to another folder, etc etc. I foresee trouble basically lol.
../ is added in front of the link for every topic that is in a sub-folder in the Project Manager rather than the root folder. It's not the folder level of the published files that causes it.
Thanks for the reply and the luck ... Kat
Hi again Kat
Hmmm, quite a conundrum you have there, eh?
Well, there is one other possibility. Similar to the number 42, you probably won't like it much. But here goes anyway.
Assuming you are the person who has final say over the project, meaning that you are the only one that generates and distributes and the others are simply contributors, you could use something like ReplacEm or FAR to perform a small post generation process of performing a search and replace. You would search only the folders for the desired string looking for ../# and eliminate the ../ or possibly even ../../ or ../../../ depending on how many folder levels you have.
Besides that, I'm about out of ideas.
Hi again Rick,
Now I really do need luck!
Thanks again... Kat