Always the same webhelp toolbar?

This forum is for all Flare issues related to styles, stylesheets and XML.
Post Reply
i-tietz
Propellus Maximus
Posts: 1219
Joined: Wed Oct 24, 2007 4:13 am
Location: Fürth, Germany

Always the same webhelp toolbar?

Post by i-tietz »

Hi there,
I want to generate a HTML Help with the Flare Webhelp Toolbar, so I switch it on in the skin.

Problem:
It always looks the same. But I need different toolbars for different purposes.
And: NO, I don't mean the buttons, but its look, size, position, ... and actually I even would like to change its content every now and then, i.e.: add more buttons - user-defined ones.
I found the "template" file toolbar.htm in the MadCap program folder and the javascript file MadCapToolbar.js processing the toolbar ...

But there's just one each!
I would need the pair for each project, sometimes even two or three per project (in different targets/skins) ... any chance of a workaround?

THANX!
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: Always the same webhelp toolbar?

Post by LTinker68 »

You should be able to create different skins and set up each skin to use different WebHelp toolbar icons. You'd probably then want to create multiple HTML Help targets, each one pointing to a different skin file. I've done this in WebHelp but I've never actually done it for HTML Help, but it should work.

That's if you want separate outputs. If you want one HTML Help output to switch the toolbar based on which topic is opened... I'm not sure you can do that.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
doc_guy
Propellus Maximus
Posts: 1979
Joined: Tue Nov 28, 2006 11:18 am
Location: Crossroads of the West
Contact:

Re: Always the same webhelp toolbar?

Post by doc_guy »

Actually, you CAN even do that, Lisa :)

There is a switch when you create the CSH help call that sets the skin that you want loaded. So you can have multiple skins in your project, and depending on the CSH call, a different skin can load.
Paul Pehrson
My Blog

Image
doc_guy
Propellus Maximus
Posts: 1979
Joined: Tue Nov 28, 2006 11:18 am
Location: Crossroads of the West
Contact:

Re: Always the same webhelp toolbar?

Post by doc_guy »

BTW: CSH for those who don't know is short for "context-sensitive-help"
Paul Pehrson
My Blog

Image
i-tietz
Propellus Maximus
Posts: 1219
Joined: Wed Oct 24, 2007 4:13 am
Location: Fürth, Germany

Re: Always the same webhelp toolbar?

Post by i-tietz »

LTinker68 wrote:You should be able to create different skins and set up each skin to use different WebHelp toolbar icons. You'd probably then want to create multiple HTML Help targets, each one pointing to a different skin file. I've done this in WebHelp but I've never actually done it for HTML Help, but it should work.
I know. What I'm trying to do is mainly to add more buttons. What I can do now is switching the given buttons on or off and making them look differently. I also cannot change the position or the background without editing the javascript. And that javascript is always the same one, since it's in the program folder and not in the project.
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: Always the same webhelp toolbar?

Post by LTinker68 »

doc_guy wrote:Actually, you CAN even do that, Lisa :)
He mentioned HTML Help in his first post. Since HTML Help output is a compiled format, you can't specify the skin name in the CSH call.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: Always the same webhelp toolbar?

Post by LTinker68 »

i-tietz wrote:I know. What I'm trying to do is mainly to add more buttons. What I can do now is switching the given buttons on or off and making them look differently. I also cannot change the position or the background without editing the javascript. And that javascript is always the same one, since it's in the program folder and not in the project.
You can kinda change the position if you cheat by inserting separators. And you can change the background if you edit the skin styles for the toolbar background (for the WebHelp toolbar).

I don't think there's a limit to how many custom buttons you can add -- just keep creating classes in the toolbar.

I'm still fuzzy as to whether you're trying to create multiple versions of the same help but with different toolbar options, or if you're trying to create one HTML Help output and have the toolbar options change depending on where you are in the help.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
doc_guy
Propellus Maximus
Posts: 1979
Joined: Tue Nov 28, 2006 11:18 am
Location: Crossroads of the West
Contact:

Re: Always the same webhelp toolbar?

Post by doc_guy »

Oh. Bummer. Lisa wins again for actually _reading_ the whole question... One of these days... :)
Paul Pehrson
My Blog

Image
i-tietz
Propellus Maximus
Posts: 1219
Joined: Wed Oct 24, 2007 4:13 am
Location: Fürth, Germany

Re: Always the same webhelp toolbar?

Post by i-tietz »

Hi Lisa, hi 'Flaries',
thanks for the hint.

I am trying to insert buttons that reveal invisible divs in the topic like tiny submenues.
Problem coming up:
1. Tab Styles: I added a new class, i.e. new button, called fields
2. Tab WebHelp Toolbar: I select the button fields
3. Tab WebHelp Toolbar: I Edit and insert a Custom JavaScript:

Code: Select all

function switchMenues(menue,state) {
  if (parent.document.getElementById)
  {
  	if (state == "on")
  		{ parent.document.getElementById(menue).style.visibility = "visible"; }
  	else if (state == "off")
  		{ parent.document.getElementById(menue).style.visibility = "hidden"; }
  }
}
4. Tab Styles: I edit the new class called fields:

Code: Select all

[b]ControlType[/b]        Button
[b]OnClick[/b]            What do I have to fill in here?
Inputs I tried:

Code: Select all

"javascript:switchMenues('fields','on');"

Code: Select all

javascript:switchMenues('fields','on');

Code: Select all

javascript:switchMenues('fields','on')

Code: Select all

switchMenues('fields','on')
The help for that option is not helpful:

Code: Select all

Lets you enter an "onclick" command to run when a user clicks the associated control (e.g., button).
Did I overlook sth? Am I on a completely wrong track?

THANX!

Inge
Post Reply