7 Replies Latest reply on Apr 15, 2008 7:03 AM by JLaurier

    Links to bookmarks within a snippet

    JLaurier
      I inserted several bookmarks into a snippet content and then created hyperlinks targeting these bookmarks to facilitate navigation on the page (hyperlinks are placed on top of the same snippet content).

      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
        • 1. Re: Links to bookmarks within a snippet
          MergeThis Level 4
          The target must be exactly what RH will encounter in the output. That is, when the snippet is inserted into a topic and RH is confronted with the target "!SSL!/FlashHelp/#bookmarkname," it expects to find that bookmarkname within the current topic. Therefore, your target should be "!SSL!/FlashHelp/ActualBookmarkTopic.htm #bookmarkname."

          Good luck,
          Leon
          • 2. Re: Links to bookmarks within a snippet
            Peter Grainge Adobe Community Professional (Moderator)
            I suggest you take a look at David Locke's article about Snippets on Adobe's site.

            Bookmarks in Snippets don't work. There is a way of bookmarking the snippet itself and that is in David'd article.

            • 3. Re: Links to bookmarks within a snippet
              JLaurier Level 1
              Hi Leon,

              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
              • 4. Re: Links to bookmarks within a snippet
                JLaurier Level 1
                Thanks Peter,

                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
                • 5. Re: Links to bookmarks within a snippet
                  Captiv8r Adobe Community Professional & MVP
                  Hi Jean and all

                  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
                  • 6. Re: Links to bookmarks within a snippet
                    Peter Grainge Adobe Community Professional (Moderator)
                    Thinking some more about this, during the beta testing I think it was the case that you could enter a bookmark in the snippet but the problem was that Project Manager did notdisplay it, and it had the problems that Rick points out.

                    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.

                    • 7. Re: Links to bookmarks within a snippet
                      JLaurier Level 1
                      Thanks to Rick and Peter (again) for help and precious information.

                      Jean