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

Go to Top link in Template?

Guest
Jan 06, 2010 Jan 06, 2010

Copy link to clipboard

Copied

RH 8.0.2.208 creating HTML

Is it possibe to add a Go To Top link to a template so when the user clicks the link, they automatically go to the top of the current topic?

If it is possible, will I need to bookmark the first line of each topic?

And further pushing the boundaries of wishful thinking, is there a way to implement the Go To Top feature on selective topics...only those that are beyond a certain line length, for example? I recognize this can't be accomplished through templates, but any other thoughts?

Thanks.

Views

2.1K

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 ,
Jan 06, 2010 Jan 06, 2010

Copy link to clipboard

Copied

Hi there

Just construct your link with a pound (or hash) symbol as the destination. ( # )

When clicked, the page should reload. (at the top)

Cheers... Rick

Helpful and Handy Links

RoboHelp Wish Form/Bug Reporting Form

Begin learning RoboHelp HTML 7 or 8 within the day - $24.95!

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
Guest
Jan 06, 2010 Jan 06, 2010

Copy link to clipboard

Copied

Hi Rick,

Thanks for the reply. Can I add the link in a template? (Phew. I actually knew about the hash symbol.)

How about constraining its appearance by topic length?

connie

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 ,
Jan 06, 2010 Jan 06, 2010

Copy link to clipboard

Copied

Hi again

Haven't tested this but I can't think of a reason you couldn't use it that way. After all, it should be treated as a simple URL.

Sorry, but you B-52'd me with the question about constraining its appearance by topic length. Not sure what you mean by that.

Cheers... Rick

Helpful and Handy Links

RoboHelp Wish Form/Bug Reporting Form

Begin learning RoboHelp HTML 7 or 8 within the day - $24.95!

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
Guest
Jan 06, 2010 Jan 06, 2010

Copy link to clipboard

Copied

Hi Rick,

I'll give it a go.

As for me B-52ing you, are you referring the New Wave group or the artillery laden aircraft!? I hope the former.

Let me rephrase in the form of an intelligible question. I don't want the Go to Top link to appear in all topics. I only want it to appear for lengthy topics. Is there a way to accomplish this through automation? (Rather than assigning a different template)?

Thanks.

connie

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 ,
Jan 06, 2010 Jan 06, 2010

Copy link to clipboard

Copied

Hi again

LOL - WRT the B-52 reference. I meant the bomber. As in it flew totally over my head.

Ahhh, I see now. I'm thinking the easiest approach is a different Template/Master Page.

I suppose if you are intimately familiar with JavaScript, you might concoct a script that would dynamically calculate the page length and only show a link if the page had reached the threshold. But that's a totally "on your own" sort of thing. There really isn't anything in RoboHelp that's going to aid in facilitating that sort of thing.

Cheers... Rick

Helpful and Handy Links

RoboHelp Wish Form/Bug Reporting Form

Begin learning RoboHelp HTML 7 or 8 within the day - $24.95!

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
Advisor ,
Jan 07, 2010 Jan 07, 2010

Copy link to clipboard

Copied

We use a box that hovers at the bottom right of the screen, even as you scroll up or down; however, you must manually enter the link in each topic (or template, I assume) to make it happen. Of course, you would configure your own font, color, background, border, etc.

1. Add this line after the <body> tag:

<?rh-cbt_start condition="Online" ?><p class="top"><a class="topic" title="Return to Top" href="#">↑ Top</a></p><?rh-cbt_end ?>

Make sure it's a single line when you copy/paste it in there, and don't worry when RH indents part of it. The WYSIWYG view will not show it properly, but Preview mode (and, of course, the output) will.

2. Add these elements to your style sheet (.css file):

p.top {

position: fixed;
background-color: #d8e4f8;
border: 2px solid #b0c4de;
padding: 2px;
right: 12px;
bottom: 5px;
z-index: 1;

}

A.topic:link,
A.topic:visited {

color: #0000CD;

font-family: Verdana, sans-serif;
font-size: 80%;
font-weight: normal;
font-color: 000080;
padding: 15;
text-decoration: none;

}

Good luck,

Leon

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
Guest
Jan 07, 2010 Jan 07, 2010

Copy link to clipboard

Copied

Leon,

Thank you so much. This is wonderful.

connie

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
Guest
Jan 07, 2010 Jan 07, 2010

Copy link to clipboard

Copied

Hi Leon,

I really like this solution but I have a question or two.

I added the elements you supplied to the CSS and the master topic, as appropriate. (I even bypassed the master page in favor of a single topic, just to see it in action.)

The preview mode shows the box in its correct "floating" position and at the correct size. However, when I generate a CHM, the box displays the full width of the page and does not float . It is only visible when I scroll to the bottom of the page.

Any ideas?

Again, thank you so much for providing a very helpful solution.

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 ,
Jan 07, 2010 Jan 07, 2010

Copy link to clipboard

Copied

Hi,

When you output a CHM, RoboHelp convert your XHTML topics back to HTML 4.01 transitional. This means that pages inside your CHM are rendered in IE quirks mode. Whilst in quirks mode, some rendering options are lost, one of the being position: fixed;. (That's why Leon's solution won't work in RH 7 output.)

As for the incorrect width, specify a width (such as 50px) to correctly align the width. But I doubt that helps, since it isn't correctly positioned either.

Can this be solved?

I remember trying something like this myself for CHM. I ended up unpacking the CHM, adding the HTML 4.01 strict doctype and repackaging it using MS HTML Help studio. I immediately gave up the idea, because it was too much work.

However, Rick (AKA Robowizard/Captiv8r) once pointed to a useful javascript to fix the position of elements on a page. I can't find/remember where it was (the technique also had a name, and I don't remember that either ). Rick might just be nice enough to excavate the link from his memory.

Greet,

Willam

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
Advisor ,
Jan 07, 2010 Jan 07, 2010

Copy link to clipboard

Copied

Dang, I've been working exclusively in WebHelp for so long, I just automatically jump in with my solutions withou asking about CHMs. Sorry.

Good luck,

Leon

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
Engaged ,
Apr 05, 2011 Apr 05, 2011

Copy link to clipboard

Copied

Hi Leon et all,

I'm trying to use your (very) neat solution getting the Go to top to work smoothly.

Perfect for my situation - web help (well browser based air help) output and full browser support.

What I really like about your solution is that I don't need to clutter topics with lots of links.

I have one little question and it has me scratching my head Leon.

How do I avoid overlaping text within the the topic page.

It would be good to avoid changing the marging / padding on a bunch of styles

Is there another way round this?

Picture below.

cheers

Craig

save.png

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
Advisor ,
Apr 05, 2011 Apr 05, 2011

Copy link to clipboard

Copied

Did you eliminate some of the style elements?

p.top {

position: fixed;
background-color: #d8e4f8;
border: 2px solid #b0c4de;
padding: 2px;
right: 12px;
bottom: 5px;
z-index: 1;

}

This gives me the following:

top.gif

The combination of background-color, border, and z-index is what does it for me. (The z-index property is what specifies the stack order of elements. Negative numbers are allowed, so you might try a setting of -1 if you have to.)

Good luck,

Leon

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
Engaged ,
Apr 06, 2011 Apr 06, 2011

Copy link to clipboard

Copied

Hey Leon,

Thanks so much for this. Again, a brilliant clean solution.

Had me scartching my head in night too. Your observations on elements, along with a slight change in padding in .css (e.g. P tag set to padding-right: 30px;) gives a perfect solution!

Just need to test it in every browser know to man now 😉

Cheers

Craig

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
Advisor ,
Apr 06, 2011 Apr 06, 2011

Copy link to clipboard

Copied

Based on recent forum chatter, the only browser that will probably give you pain is Google Chrome, which will either place it diagonally opposite your intended location, place it in a 3-D rendering outside the monitor and onto your right shoulder, or transform "Top" to "Nowhere" and turn that into an upside-down, diagonal 100% watermark. 🙂 That Jeff Bezos sure has a sense of humor, doesn't he?

But don't worry, there's probably a workaround...NOT!

Good luck,

Leon

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
Engaged ,
Apr 06, 2011 Apr 06, 2011

Copy link to clipboard

Copied

LOL

Funnily enough it looks like IE is going to have the issue with z-index, so the HTML5 developers have told me.

But who is using IE these days

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 ,
Apr 06, 2011 Apr 06, 2011

Copy link to clipboard

Copied

Not to mention that the HTML 5 specification knows nothing about framesets.

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
Advisor ,
Apr 06, 2011 Apr 06, 2011

Copy link to clipboard

Copied

The HTML 5 replacement for a <frameset> will be <frames>, but that deprecation seems to be a bit delayed. First Working Draft was 8/6/2002, and second Working Draft on 10/12/2005. According to Wikipedia, "As of today, XFrames still remains a W3C Working Draft with no clear indication on if and when it will become a W3C Recommendation."

So methinks we're safe for awhile...

Good luck,

Leon

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 ,
Apr 06, 2011 Apr 06, 2011

Copy link to clipboard

Copied

Hi Leon

Thanks for the info. Here is where I gathered my info.

I recently attended the Writer's UA conference in Long Beach in Adobe's behalf. There was a single session I decided to attend. It was related to HTML 5. The presenter made a big point of stating that HTML 5 *WILL NOT* support framesets so all the HAT manufacturers will likely need to find other ways of presenting their web based content as most (if not all) of them take the frameset approach.

He did state that IFRAMEs would still be valid.

I do know the standard is still evolving, but from the picture you are painting it would seem the jury may still be out on this. However, I note that we are beginning to see issues with Google Chrome and others where framesets are causing issues. At least when viewed locally. And I can't help but to consider this may be a harbinger of things to come in the web world.

It will certainly be an interesting ride to see what finally emerges, eh?

Thanks again for sharing... 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
Advisor ,
Apr 06, 2011 Apr 06, 2011

Copy link to clipboard

Copied

LATEST

From the example I saw,

<frameset>

...<frame>

...</frame>

...<frame>

...</frame>

</frameset>

will be replaced with

<frames>

...<group>

...</group>

...<group>

...</group>

</frames>

So it appears that the W3C is looking to change the syntax at the same time that it's correcting the long-standing security and presentation issues that they and others have identified. The HAT producers will certainly have enough warning, however, so they'll have no excuse when the hammer falls.

Good luck,

Leon

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