Links to bookmarks within a snippet
Copy link to clipboard
Copied
The problem is that when using these hyperlinks on pages (after generating layout output) using the snippet content, I get an error message indicating that target is not find (the address mentionned is .... /!SSL!/FlashHelp/#bookmarkname).
I have two questions :
1- Can we insert bookmarks within a snippet content?
2- Can we create hyperlinks targeting bookmarks where both elements are on the same snippet content?
Thanks.
Jean Laurier
Copy link to clipboard
Copied
Good luck,
Leon
Copy link to clipboard
Copied
Thanks for your feedback.
" Therefore, your target should be "!SSL!/FlashHelp/ActualBookmarkTopic.htm #bookmarkname.""
In fact, using a full (mostly) path when defining target works well but only once! I mean, only for that instance... for that topic (where the snippet is in use).
Since the advantage of snippets is to use them in several topics (to make content update easier), it is however impossible to defined more than one target for an hyperlink!
Rgds,
Jean
Copy link to clipboard
Copied
Bookmarks in Snippets don't work. There is a way of bookmarking the snippet itself and that is in David'd article.
Copy link to clipboard
Copied
I was afraid that this answer would occur! I took a look at David Locke's article and it seem very clear indeed.
I hope Adobe will find a way to enhance RH 7 snippet feature very soon. It is a very good idea but it is not actually very easy to manage.
Rgds,
Jean Laurier
Copy link to clipboard
Copied
Where there is a will, there is nearly always a way. I managed to coax a bookmark into working with a snippet, but it's a bit on the tricksy side and not without quirks.
Basically, I used a teensy bit of JavaScript code to accomplish it. Here are my steps.
Edit the snippet.
Insert the cursor where you would like to insert the bookmark.
Click Insert > HTML > Advanced > Script...
Type the following into the Script dialog: document.write('<a name=bookmark_name></a>');.
Click OK to dismiss the dialog.
Here are the quirks.
* When you go to create links to the bookmarks, you will be forced to manually type the bookmark name. No drag and drop or choosing from a dialog.Because it is being written in dynamically using JavaScript, RoboHelp is totally unaware of it.
* If you test using Preview, the link will fail. But should work fine in output. (I tested inside a .CHM file)
* RoboHelp will list links to the bookmark as being broken. (Remember? The bookmark is being dynamically added as the page displays, so RoboHelp doesn't know it is there.
Hopefully this helps... Rick

Copy link to clipboard
Copied
I came here wanting to place a link in a snippet that would point to a bookmark on a page where the bookmark name would always be the same and would always exist on a page where the snippet was also included, not to a bookmark inside of a snippet. Still, the answer Captiv8r​ gave was spot-on.
The bookmark is #available, I opened the snippet, of course this is a newer version so did Insert>Javascript>Javascript, then typed document.write('<a name=bookmark_name>hyperlink_text</a>'); et voila! Now robohelp doesn't insert "..\..\..\..\" in front of my bookmark name in the snippet, and the snippet works fine in the output, too.
Because my bookmark is not inside the snippet, it doesn't show up as a broken link, either. Bonus!
Thank you for the perfect tip! !
Copy link to clipboard
Copied
This means you have to remember every bookmark in every Snippet, and make sure your successor is aware of them.
For those reasons, I recommend bookmarking the snippet itself.
If you do go for either Rick's solution or trying this, make sure your bookmarks have an ID at the beginning or end so that you can spot them in the list of broken links, otherwise you won't know these from real broken links.
Copy link to clipboard
Copied
Jean
Copy link to clipboard
Copied
Hi,
I know this issue is super old, but I'm wondering if this is still not possible?
We're using RoboHelp 2019 Classic version.
In my opinion, being able to link to the same topic from inside a snippet should be a no-brainer.
Cheers, Birgit
Copy link to clipboard
Copied
@Faeneth This thread is about topics pointing to a bookmark within a snippet. I am reading your post as wanting to link to a one topic from multiple topics containing the snippet. Two different directions.
The latter scenario works in 2020 and my guess is it would work in Classic. It's easy enough to set up a quick test project.
________________________________________________________
See www.grainge.org for free Authoring and RoboHelp Information

