• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Using images in snippets.

New Here ,
Mar 03, 2011 Mar 03, 2011

Copy link to clipboard

Copied

Hi,

I have a small "Top of Page" image that I use in longer Help topics. I hyperlinked the image to # to automatically return them to the top of the page when they click the image. This works fine when the image is inserted on it's own but I tried to make a snippet out of it and it doesn't work. The image doesn't display in the WYSIWYG but does display in the output. When I click the image I get "Page cannot be displayed." Do I need to code the image in the snippet to make this work?

Thanks,

Views

688

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 03, 2011 Mar 03, 2011

Copy link to clipboard

Copied

If you add the # mark in the snippet it works in Preview so I would expect it to work in the output.


See www.grainge.org for RoboHelp and Authoring tips

@petergrainge

Help others by clicking Correct Answer if the question is answered. Found the answer elsewhere? Share it here. "Upvote" is for useful posts.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Sep 27, 2011 Sep 27, 2011

Copy link to clipboard

Copied

Old post from JAH9162, but anyway: #refs don't work in snippets included in topics. RH automatically changes the href to link to the snippet. That is, if you have something like href="#Top" in your snippet it will become href="..\..\..\#Top" in the output.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 27, 2011 Sep 27, 2011

Copy link to clipboard

Copied

That could easily be fixed with a few simple find and replace operations on the output.

FIND ..\..\..\# top REPLACE #top

FIND ..\..\# top REPLACE #top

FIND ..\# top REPLACE #top

etc, done in the order of the deepest path first. Include the #top in the find or you will mess up a whole load of links.

Bizarrely if you click the link before doing that when using Firefox, the topic pane shows a Windows Explorer type view of the root of the output and allows you to navigate to the topic. (Only tested locally, not on a server.)


See www.grainge.org for RoboHelp and Authoring tips

@petergrainge

Help others by clicking Correct Answer if the question is answered. Found the answer elsewhere? Share it here. "Upvote" is for useful posts.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 28, 2011 Sep 28, 2011

Copy link to clipboard

Copied

Thinking about it some more just repeating FIND ..\# top REPLACE #top several times until it stops finding anything will do the job. It will be once for every level below the root.


See www.grainge.org for RoboHelp and Authoring tips

@petergrainge

Help others by clicking Correct Answer if the question is answered. Found the answer elsewhere? Share it here. "Upvote" is for useful posts.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 28, 2011 Sep 28, 2011

Copy link to clipboard

Copied

LATEST

Hi all

What my good friend Peter is suggesting will certainly work, but it will also have to be repeated each time you generate the WebHelp.

If you don't wish to do the find and replace hokey pokey each time, you might consider using some simple JavaScript that will perform a "write in" of the proper link code.

Edit the HTML of your snippet.

The image code should look something like this:

<img src="imagefilename.gif" alt="" style="border: none;" border="0" />

*NOTE: Of course, your own file name will be different.

Just before that code, insert this code:

<script type="text/javascript">document.write('<a href="#">');</script>

And just after the image code, insert this code:

<script type="text/javascript">document.write('</a>');</script>

So all together it would look like this:

<script type="text/javascript">document.write('<a href="#">');</script><img src="imagefilename.gif" alt="" style="border: none;" border="0" /><script type="text/javascript">document.write('</a>');</script>

Once you make those changes things should work and you won't have to do any find and replace each time you generate.

Cheers... Rick

Helpful and Handy Links

RoboHelp Wish Form/Bug Reporting Form

Begin learning RoboHelp HTML 7, 8 or 9 within the day!

Adobe Certified RoboHelp HTML Training

SorcerStone Blog

RoboHelp eBooks

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
RoboHelp Documentation
Download Adobe RoboHelp