Is there a way to have a hyperlink convert to a "Go to page" for the print document. I looked at cross-reference links, but that seems different. I just want my "regular" hyperlinks to automatically convert for print.
Thanks
How to convert regular hyperlink to reference in print?
-
- Senior Propellus Maximus
- Posts: 3669
- Joined: Thu Feb 02, 2006 9:57 am
- Location: Pittsford, NY
Re: How to convert regular hyperlink to reference in print?
To achieve the behavior you're seeking, you should use cross-references, not hyperlinks.
You can define the MadCap|xref style in your stylesheet so that it looks just like a hyperlink (blue underlined, no reference to a page) in your online target and just like a print-based cross-reference (with or without quotation marks, not underlined, not blue, with a reference to a page) in your print target. You'd define its hyperlink qualities for the default medium and the cross-reference qualities for the print medium. (Or, if you like to use different stylesheets altogether, rather than mediums, just make sure that you've got the same named xref style in each stylesheet and then set them up in each as needed.)
I think the Flare Help is pretty good about explaining how to set up and use cross-references. I have personally heard MadCap's tech writer talk about how he prefers to use cross-references over hyperlinks, even in topics that he doesn't intend to output to a print target. The beauty of a cross-reference -- besides how it can be rendered differently for different media -- is that its text (not just the underlying link) will update automatically if you change the heading of the topic it's referencing.
I hope this gives you enough to get started.
You can define the MadCap|xref style in your stylesheet so that it looks just like a hyperlink (blue underlined, no reference to a page) in your online target and just like a print-based cross-reference (with or without quotation marks, not underlined, not blue, with a reference to a page) in your print target. You'd define its hyperlink qualities for the default medium and the cross-reference qualities for the print medium. (Or, if you like to use different stylesheets altogether, rather than mediums, just make sure that you've got the same named xref style in each stylesheet and then set them up in each as needed.)
I think the Flare Help is pretty good about explaining how to set up and use cross-references. I have personally heard MadCap's tech writer talk about how he prefers to use cross-references over hyperlinks, even in topics that he doesn't intend to output to a print target. The beauty of a cross-reference -- besides how it can be rendered differently for different media -- is that its text (not just the underlying link) will update automatically if you change the heading of the topic it's referencing.
I hope this gives you enough to get started.
Nita
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
Re: How to convert regular hyperlink to reference in print?
when we made the conversion from hyperlinks to xrefs we were able to do a Find and Replace (FnR) to make the transistion pretty quick, assuming you dont have any special characteristics in your links (conditions, inline styles, etc) a quick FnR should get you on the xref train pretty quick.
Plain hyperlink
Cross Reference (don't know how plain this is)
FnR
Find: a href= (no space after the '=')
Replace: MadCap:xref href= (no space after '=')
Check, Find in source code
This will make the hyperlinks look like plain text (until you select Tools > Update Cross-References... from the main menu (which is per topic, grrrrr) ) or just build and the xrefs will come out like the default madcap.xref style class. Let me know if you have any issues or more questions.
*the additional xref code will show up when updated / prolly after a build ....
Plain hyperlink
Code: Select all
<p><a href="clickme.htm">Click Me</a></p>
Code: Select all
<p><MadCap:xref href="clickme.htm" target="" title="" alt=""><span style="color: #0000ff;" class="mcFormatColor"><u>Click Me</u></span>(<i><span style="color: #0000ff;" class="mcFormatColor"><u>on page 1</u></span></i>)</MadCap:xref></p>
Find: a href= (no space after the '=')
Replace: MadCap:xref href= (no space after '=')
Check, Find in source code
This will make the hyperlinks look like plain text (until you select Tools > Update Cross-References... from the main menu (which is per topic, grrrrr) ) or just build and the xrefs will come out like the default madcap.xref style class. Let me know if you have any issues or more questions.
*the additional xref code will show up when updated / prolly after a build ....
Flare: I bought it ... so that means I can break it, right?
Re: How to convert regular hyperlink to reference in print?
If you do that, you'd also need to do a second find and replace to change the closing tags; i.e. replace </a> with </MadCap:xref>.
However, bear in mind bookmarks also use the a (anchor) tag, so do it one-by-one rather than replace all.
Note that anything (text, tags, etc.) between the opening and closing MadCap:xref tags is completely irrelevent; it's just a placeholder that will be replaced entirely when the topic is built.
However, bear in mind bookmarks also use the a (anchor) tag, so do it one-by-one rather than replace all.
Note that anything (text, tags, etc.) between the opening and closing MadCap:xref tags is completely irrelevent; it's just a placeholder that will be replaced entirely when the topic is built.
Re: How to convert regular hyperlink to reference in print?
oops, i forgot to add the closing tag search .... doh!
Flare: I bought it ... so that means I can break it, right?