Custom icon for toggler instead of text?
Custom icon for toggler instead of text?
I'm experimenting with togglers right now for our OLH and I've been instructed to find a way to use an icon, such as a camera, as the image to click on to access a toggled screen shot for example, instead of using text as the toggler hotspot. Do I have to insert the icon into my originating material (Frame) in order to make this happen? So that I can highlight it and make it the toggler hotspot?
Re: Custom icon for toggler instead of text?
I found an awkward workaround, but I believe you will be able to acheive what you are trying to accomplish.
Insert a toggler and just keep the default "Click Me!" text that it gives you (or reduce it to one character, you need something or OK becomes inactive). Obviously also select the Named Element that you want to toggle at this point. Once the toggler has been inserted, insert the image you want to use inside the toggler tag. Now that the image is in there, delete the text (first, see problem #1 below). You now have a toggler with only an image and no text.
Additionally, you may want to turn off the little toggler indicator gif that appears by default when you generate output. You can do this in the stylesheet. Go to MadCap|toggler and set the mc-image-position to "none." Now you get only your image. I tried simply using my own image as the toggler indicator, but the toggler still requires that I enter some kind of content.
Two problems I found with this workaround:
1) If you insert the image at the end of the text inside the toggler tag, when you delete the text using Backspace, you will delete the whole toggler (but you can use the Delete key and it will work fine).
2) If you want to edit the toggler (have it toggle another or a different element), you have to add text again and you will in turn delete the image that is in there.
Hope this helps! Does anybody else have a better way to get this to work?
--G
Insert a toggler and just keep the default "Click Me!" text that it gives you (or reduce it to one character, you need something or OK becomes inactive). Obviously also select the Named Element that you want to toggle at this point. Once the toggler has been inserted, insert the image you want to use inside the toggler tag. Now that the image is in there, delete the text (first, see problem #1 below). You now have a toggler with only an image and no text.
Additionally, you may want to turn off the little toggler indicator gif that appears by default when you generate output. You can do this in the stylesheet. Go to MadCap|toggler and set the mc-image-position to "none." Now you get only your image. I tried simply using my own image as the toggler indicator, but the toggler still requires that I enter some kind of content.
Two problems I found with this workaround:
1) If you insert the image at the end of the text inside the toggler tag, when you delete the text using Backspace, you will delete the whole toggler (but you can use the Delete key and it will work fine).
2) If you want to edit the toggler (have it toggle another or a different element), you have to add text again and you will in turn delete the image that is in there.
Hope this helps! Does anybody else have a better way to get this to work?
--G
Re: Custom icon for toggler instead of text?
Gordo,
Thanks very much; your suggestion worked perfectly. The only small change I needed to make was to add a space between the single character and the icon I configured in the stylesheet before I could delete the single character. You figured this out very quickly...I really appreciate your help!
Diana
Thanks very much; your suggestion worked perfectly. The only small change I needed to make was to add a space between the single character and the icon I configured in the stylesheet before I could delete the single character. You figured this out very quickly...I really appreciate your help!
Diana
-
- Propellus Maximus
- Posts: 1985
- Joined: Tue Jan 23, 2007 8:18 am
- Location: Darn, I knew I was around here somewhere...
Re: Custom icon for toggler instead of text?
Here's a recommendation on how to streamline this process. Go through the steps you've already discussed, then turn the toggler into a snippet.
Now, when you need a toggler, insert the snippet, convert it to text, and then edit it to toggle the appropriate element name. (The convert to text part is essential unless all of your togglers point at the same name...)
The advantage of this is it saves having to do surgery on a toggler every time you need one.
Now, when you need a toggler, insert the snippet, convert it to text, and then edit it to toggle the appropriate element name. (The convert to text part is essential unless all of your togglers point at the same name...)
The advantage of this is it saves having to do surgery on a toggler every time you need one.
Until next time....
Kevin Amery
Certified MAD for Flare
Kevin Amery
Certified MAD for Flare