Hi again,
Thanks for the tips. However, trying to apply this was not
easy since RH uses a number of macros to generate the final code.
It was too difficult for me, so I gave up after a while.
I guess I need to be a little bit more precise when
explaining what it is I wish to achieve. I have a client that
develops a web application that links to the WebHelp. The
application runs on a test server before it is tranferred to the
production server but the WebHelp runs on a separate server
dedicated for WebHelp. When the application runs on the test
server, it gets a banner on top of every page saying its a test
environment. The client would like to have the same feature for the
WebHelp, that is, if the application is undergoing test it should
apply for the WebHelp as well.
So, if the test of the application is ok, the WebHelp does
not need to be recompiled, meaning it is possible to move the
WebHelp from a test directory to a live directory on the separate
server and only change the url in the application. Now, here's the
trick (and problem): It would be nice to make this move without the
need to recompile (to remove the banner, e.g. using conditional
text) the WebHelp, that is, WebHelp in test directory = banner
visible, WebHelp moved to live directory = banner hidden. I have
different ulr's for each directory, so my idea was to distinguish
them by sniffing the url with a javascript and then hide/display
the banner.
I have actually succeded in creating such a javascript that
do all of these things, and it works perfect on my test pages:
- check if the url is app-test.company.com or
app.company.com.
-- if app-test, do the following:
--- if a stand-alone page, do the following:
----- display the banner on top of the page (using css and
js).
--- if page in frameset, do the following:
----- hide banner on page and instead display banner in a top
frame (separate file) on top of the complete WebHelp.
-- if app, do the following:
--- display pages as normal without banner.
The problem is that I cannot add this code to RH and keep it
when generating the WebHelp. A way could be to find some resource
file(s) that RH uses during compining, and in that file(s) add my
code (e.g. for the skin thing that potentially solves the frame
problem, the source seem to be the skn-file). I may get the client
to accept that the banner is displayed only on stand-alone pages
(since context-sensitive help is used more often than opening the
entire WebHelp frameset) leaving the frame stuff behind, but I
haven't succedeed in finding the proper source file for the single
page solution.
The reason I want to access the source file is that it makes
it possible to add this feature without the need for the client to
do any hands-on work afterwards, just keep on compiling, even
recompiling existing WebHelp without the need to add or alter
anything. This would be the ultimate thing to achieve.
Perhaps there is a better and more simplier solution to all
of my problems? :)
Regards, Mattias