Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-help-dev] Reaching the same HTML page from different TOC entries

No, this is not really supported.

There is a workaround, but it has some limitations:
You can add a query string to the topic href when you define it in the
toc.xml file and then use Javascript inside that topic  to make certain
section visible/hidden.

For example:

<topic label="Concepts">
       <topic label="MyCommonTopic"  href
="mycommontopic.html?parent=Concepts"/>
   .......
</topic>

<topic label="Getting Started">
         <topic label="MyCommonTopic" href
="mycommontopic.html?parent=GettingStarted"/>
     ....
</topic>

In mycommontopic.html add some javascript that does something like this:

onload = showRelatedLinks

function showRelatedLinks()
{
      var queryString = window.location.search;
            // extract your parent topic parameter
                var parentTopic = getParentTopic(queryString);
                switch(parentTopic) {
            case "Concepts" :
                                          makeConceptsSectionVisible(); //
use CSS or DOM calls (this will likely be browser specific)
              .......
}

The drawback
- currently topics with query parameters are not indexed by the help system
(feel free to open a feature for this)
- things won't work when javascript is disabled
- making things visible/hidden may be browser dependant
- I am not sure about accessibility rules regarding this.

-Dorian



|---------+----------------------------------->
|         |           Eduardo                 |
|         |           Angel/UK/IBM@IBMGB      |
|         |           Sent by:                |
|         |           platform-help-dev-admin@|
|         |           eclipse.org             |
|         |                                   |
|         |                                   |
|         |           11/13/2002 06:23 AM     |
|         |           Please respond to       |
|         |           platform-help-dev       |
|         |                                   |
|---------+----------------------------------->
  >-------------------------------------------------------------------------------------------------------------|
  |                                                                                                             |
  |       To:       platform-help-dev@xxxxxxxxxxx                                                               |
  |       cc:                                                                                                   |
  |       Subject:  [platform-help-dev] Reaching the same HTML page from different TOC entries                  |
  |                                                                                                             |
  |                                                                                                             |
  >-------------------------------------------------------------------------------------------------------------|



Hello all,

I am working on a Help System that contains the following top-level topics:
Getting Started, Concepts, Tasks, Reference and Samples. The Getting
Started section contains links to HTML pages that are actually contained in
the other topics (such as Concepts, Tasks, etc.).
Is it possible to display the same page in different modes, depending on
where you come from (i.e. Getting Started vs. Concepts)? We want our pages
to display particular links  when accessing them from "Getting Started" and
not from the other top-level topics.

Regards,

Eddie

******************************************
Eduardo Angel
CICS User Technologies
IBM Hursley Laboratories
Hicom 24-5683
External Phone 01962 81 5683
e-mail: eddie.angel@xxxxxxxxxx
*******************************************


_______________________________________________
platform-help-dev mailing list
platform-help-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/platform-help-dev





Back to the top