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

Adding a hyperlink to a DIV in the RH2017 interface

New Here ,
Jan 04, 2018 Jan 04, 2018

Copy link to clipboard

Copied

Hi all,

We have a custom button set up as a div. I can add the div to what would be the button text easily enough, but I can't find a way to link it without just going into the code.  That is, it won't let me attach a hyperlink to a DIV.

Is there some trick to this I'm not seeing? I could swear I've done this before...

Thanks!

Christian

Views

366

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 04, 2018 Jan 04, 2018

Copy link to clipboard

Copied

Hi there

I think more information is needed here.

For example, what exactly do you mean when you say "We have a custom button set up as a div"? A button is an object on a page. I'm not sure how one goes about setting a button up as a div.

Generally speaking, in the RoboHelp editor you select what you want and you then make it a hyperlink. The fact you seem to be talking about divs suggests that you are more than comfortable mucking around in the code. So assuming it's possible to make a div a hyperlink, one would think it would be a cake walk for configuring a hyperlink.

Cheers... Rick

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
New Here ,
Jan 04, 2018 Jan 04, 2018

Copy link to clipboard

Copied

Always make them ask before you overshare

Basically we have clickable images.  These aren't actual image files, but DIVs containing text, all set up to have a custom look.  Basically, I need to recreate this construction:

<a class="link_style" href="http://target.url.com">

     <div class="div_style">Clickable Text</div>

</a>

I have the CSS set up, so the buttons look right and the links behave properly and all that stuff. I'm struggling to figure out how to imbed the DIV in the hyperlink, because:

1) We have multiple writers and not all are comfortable with raw HTML. Basically just me, really. But...

2) Tomorrow is my last day, and I'm trying to set this up for my future former co-workers

Thanks!

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 04, 2018 Jan 04, 2018

Copy link to clipboard

Copied

Hmmm, have you tried putting this into a User Defined Variable?

Or perhaps a snippet?

Cheers... Rick

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
New Here ,
Jan 04, 2018 Jan 04, 2018

Copy link to clipboard

Copied

I have fiddled with snippets. I'm not expert, but would snippets allow you to have different button text and a different target URL for each copy?

I looked at variables.  I'm not sure how I could make those work.

I think I CAN make it work by enclosing the hyperlinked text in a SPAN tag, but I don't know how to insert those into RH either

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 04, 2018 Jan 04, 2018

Copy link to clipboard

Copied

Snippets are essentially designed so that you maintain a single copy in the Snippets pod, then insert instances of that snippet where you need them. Think of something along the lines of a disclaimer notation that would need to appear before certain sections. You ever need to change it up, you only change the one snippet and poof! All instances now reflect what you changed.

From what you have described, that won't really work for you.

BUT - I have a project where I have snippets that are designed to be what I can only describe as "starter templates". For example, there are places where I want a table. And in the left cell, the word *NOTE: in bold and bright red. And in the right cell, what the notation is all about. But in almost every case, the verbiage should be different. Sooooo I created a snippet for this. When I need to insert this stuff, I drag the snippet over into the topic and drop it. THEN I right-click the snippet and choose to convert it to HTML. At that point it's just code on the page and no longer associated with the snippets pod. So any changes to that original snippet are ignored.

Cheers... Rick

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
New Here ,
Jan 04, 2018 Jan 04, 2018

Copy link to clipboard

Copied

LATEST

Oh cool - I didn't know you could do that.  That might work!  Let me make sure the luddites are comfortable

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