Button for copying navigation and topic name to clipboard?

Please post all questions and comments regarding Help & Manual 7 here.

Moderators: Alexander Halser, Tim Green

Button for copying navigation and topic name to clipboard?

Unread postby DavidLink » Tue Jul 02, 2019 1:40 pm

Hey guys,

So we've updated to H&M 7!

When talking to our customers we often need to refer them to a particular topic, sometimes this can be 3-4 levels deep:
Image

We usually highlight then copy-paste the bit after Navigation, but that now gets us:


Navigation: Wiring Information > Input Signal Wiring > Trigger Inputs > Specific Trigger Applications >

Previous pageReturn to chapter overviewNext page

Subaru EZ30R





which needs to be faffed about with to make it readable.

Is there any way to add a button or a link or something so that we can single click to copy the address+title of the current topic directly to clipboard?
Any other ideas? What if clicking on the word "Navigation" did it?

Also we're not too worried about the basic style, we've got the colouring in department onto designing pretty colours with our logo etc in it.

Cheers


David
User avatar
DavidLink
 
Posts: 13
Joined: Wed Jun 10, 2015 3:15 am

Re: Button for copying navigation and topic name to clipboar

Unread postby Tim Green » Tue Jul 02, 2019 5:24 pm

Hi David,

Copying to the clipboard from HTML has got problematic in the last couple of years because of security concerns, so you will need to copy it manually if you want to avoid some complex JavaScript hoops here. You can make it easier to copy by simplifying the header code in the skin you're using. Open the .hmskin file in Help+Manual and edit in Configuration > HTML Page Templates > Default. The code that inserts the breadcrumbs and the Navigation: text is this bit:

Code: Select all
<p class="crumbs"><b>Navigation:</b>&nbsp;
     <IFNOT_TOPIC_BREADCRUMBS>&raquo;No topics above this level&laquo;</IFNOT_TOPIC_BREADCRUMBS>
     <IF_TOPIC_BREADCRUMBS><%TOPIC_BREADCRUMBS%>&nbsp;&gt;</IF_TOPIC_BREADCRUMBS></p>

You could simplify this and add the topic title like this:

Code: Select all
<p class="crumbs"><IFNOT_TOPIC_BREADCRUMBS>&raquo;No topics above this level&laquo;</IFNOT_TOPIC_BREADCRUMBS>
     <IF_TOPIC_BREADCRUMBS><%TOPIC_BREADCRUMBS%>&nbsp;&gt;</IF_TOPIC_BREADCRUMBS>&nbsp;<%TOPIC_TITLE%></p>

This removes the "Navigation:" text, which you can do without, and includes the plain text short topic title from the TOC directly in the breadcrumbs. Then you can copy just that bit.

That provides an idea for starters. If you want to see what other variables you can use, the reference is here:

https://helpandmanual.com/help/hm_ref_v ... _html.html
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
User avatar
Tim Green
Site Admin
 
Posts: 21098
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany


Return to Help & Manual 7 Forum

Who is online

Users browsing this forum: MSN [Bot] and 4 guests