Make "click to display TOC" link open in new window

Please post all questions relating to Help & Manual 6 here!

Moderators: Alexander Halser, Tim Green

Post Reply
Debra Crum
Posts: 26
Joined: Wed Aug 14, 2013 4:03 pm

Make "click to display TOC" link open in new window

Unread post by Debra Crum »

We're linking to particular topics within our web help from help icons in our web-based app. We would like the "Click to Display Table of Contents" link to open in a new window instead of in the same window. This is because we are going to have the topic-based help anchored in a little widget on the left side of the page in the app.

Is there a file in the "Baggage" of my webskin where I can change target="_top" to target="_blank"?

Thanks!
User avatar
Tim Green
Site Admin
Posts: 23181
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Make "click to display TOC" link open in new window

Unread post by Tim Green »

Hi Debra,
Is there a file in the "Baggage" of my webskin where I can change target="_top" to target="_blank"?
Where and how you do this depends on the skin you are using. In particular, it's in different places in Premium Pack skins and the standard skins supplied with Help & Manual. Which is your skin for this project?
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.
Debra Crum
Posts: 26
Joined: Wed Aug 14, 2013 4:03 pm

Re: Make "click to display TOC" link open in new window

Unread post by Debra Crum »

Hi Tim,

I'm using WebHelp_WindowsBlue from 2.4.2
User avatar
Tim Green
Site Admin
Posts: 23181
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Make "click to display TOC" link open in new window

Unread post by Tim Green »

Hi Debra,

You can change this in the topic page template. Open the skin in Help & Manual and in the Project Explorer on the left go down to Configuration > HTML Page Templates > Default. You will find the block of code you are looking for directly below the opening <div id="hmheadercontents"> tag. Here is the entire block:

Code: Select all

<div id="hmheadercontents">
<IFNOT_OPT_BREADTRAIL><p id="breadcrumbs" class="sync-toc">
<b><span class="sync-toc"><a rel="nofollow" class="sync-toc-link" href="<%HREF_TOP_PAGE%>?<%HREF_CURRENT_PAGE%>" target="_top"><<&nbsp;<%BREAD_TOC%>&nbsp;>></a>&nbsp;&nbsp;</span></b></p></IFNOT_OPT_BREADTRAIL><IF_OPT_BREADTRAIL><p id="breadcrumbs">
<b><span class="sync-toc"><a rel="nofollow" class="sync-toc-link" href="<%HREF_TOP_PAGE%>?<%HREF_CURRENT_PAGE%>" target="_top"><<&nbsp;<%BREAD_TOC%>&nbsp;>></a>&nbsp;&nbsp;</span><span class="sync-toc-off"><%BREAD_LABEL%></span></b><span class="sync-toc-off"><IFNOT_TOPIC_BREADCRUMBS>&nbsp;&raquo;<%BREAD_NOTOPIC%>&laquo;</IFNOT_TOPIC_BREADCRUMBS>
<IF_TOPIC_BREADCRUMBS><%TOPIC_BREADCRUMBS%>:</IF_TOPIC_BREADCRUMBS></span></p></IF_OPT_BREADTRAIL> 
<%TOPIC_HEADER%><IFNOT_TOPIC_HEADER><h1 class="p_Heading1"><span class="f_Heading1"><%TOPIC_TITLE%></span></h1></IFNOT_TOPIC_HEADER>
</div>
There are two versions of the link, one for pages with headers and one for pages without. You need to change target="_top" for both versions.

IMPORTANT WARNING: Don't switch back to the simple layout mode tab in skins with edited source code! Doing this will replace your edited version with the default template and delete your changes. You will be warned if you try to do this, and this is a warning you should take seriously. This is particularly important when editing pre-designed skins, as switching to simple mode there will delete all the custom code and make the skin unusable.
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.
Debra Crum
Posts: 26
Joined: Wed Aug 14, 2013 4:03 pm

Re: Make "click to display TOC" link open in new window

Unread post by Debra Crum »

Thanks Tim! It's working perfectly. I made a copy of the template before I made any changes... just in case :)
Post Reply