Set default value for hyperlink target frame

This forum is for all Flare issues not related to any of the other categories.
Post Reply
abakus
Jr. Propeller Head
Posts: 8
Joined: Tue Feb 28, 2023 4:37 am

Set default value for hyperlink target frame

Post by abakus »

Hi!

For hyperlinks and cross-references you can set the target frame. The first option is "(default)":
2023-06-19 10_49_44-target_frame.jpg ‎- Fotos.png
This leads me to believe that the default value can be preset.
Question: Is it possible to set the behavior for (default) somewhere in MadCap Flare, so that e.g. hyperlinks are opened in a new window/tab by default?

Thank you so much!
You do not have the required permissions to view the files attached to this post.
RStreets
Propeller Head
Posts: 63
Joined: Wed Apr 19, 2017 8:37 am
Location: Cambridge, UK

Re: Set default value for hyperlink target frame

Post by RStreets »

Having looked at the help (e.g. https://help.madcapsoftware.com/flare20 ... %20Default, step 9), I think you're out of luck. I'm pretty certain that the (default) option shown when inserting hyperlinks is the same as the "Page Default" described here (which is what's offered when you insert a cross reference).

I certainly can't think of a way of setting a default behavior for "(default)"! :(
Rae Streets (Flare user since 2017, now on Flare 2023; Central user from 2020)
VikasSharma088
Jr. Propeller Head
Posts: 2
Joined: Sun Nov 26, 2017 7:06 am
Contact:

Re: Set default value for hyperlink target frame

Post by VikasSharma088 »

It is possible to set the behavior for (default) in MadCap Flare, so that hyperlinks are opened in a new window/tab by default. This can be achieved by doing modification inside master page or stylesheet. By adding target-name: "_blank"; property to the appropriate CSS rule in the master page or stylesheet, all hyperlinks in your articles will open in a new window or tab when published.
NorthEast
Master Propellus Maximus
Posts: 6426
Joined: Mon Mar 05, 2007 8:33 am

Re: Set default value for hyperlink target frame

Post by NorthEast »

Sorry, but this doesn't sound right for a number of reasons.
VikasSharma088 wrote: Tue Jun 20, 2023 3:59 amThis can be achieved by doing modification inside master page or stylesheet
Not sure how it can be "master page or stylesheet". They're quite different things, and I can't see how making a change to either is going to change the default behaviour required.
VikasSharma088 wrote: Tue Jun 20, 2023 3:59 amBy adding target-name: "_blank"; property to the appropriate CSS rule in the master page or stylesheet, all hyperlinks in your articles will open in a new window or tab when published.
There is a HTML target attribute that you set for individual links, for example target="_blank". But that's a HTML attribute, and not CSS. That also wouldn't set the default behaviour required.


To answer the OP, I don't think you can set a default. In many situations in Flare, the "(default)" label really means "not set".
So in the case of the target frame for links, each option will set the relevant target="xxx" attribute in the HTML code, but setting (default) will remove that target attribute.
trent the thief
Propellus Maximus
Posts: 614
Joined: Wed Feb 01, 2006 6:21 am
Location: Off in the dark....

Re: Set default value for hyperlink target frame

Post by trent the thief »

There's no method to set any "(default)" value settings. That's Flare's placeholder for null.
Trent.

Certifiable.

Image

umm...
I meant MAD Certified.

Official Propeller Beanie Owner :-)

:flare: Are you on Flare's Slack channels? PM me for an invitation! :flare:
abakus
Jr. Propeller Head
Posts: 8
Joined: Tue Feb 28, 2023 4:37 am

Re: Set default value for hyperlink target frame

Post by abakus »

Thanks for all of your replies!

There is indeed a css property called target-name (https://www.w3schools.com/cssref/css3_p ... t-name.php) which would have the wished behaviour, but it's not supported by browsers.

Then there is a <base> tag (https://www.w3schools.com/tags/tag_base.asp) and

Code: Select all

<head>
<base target="_blank"> 
</head>
would also lead to my expected results but it seems not to work with MadCap Flare :(

At least I found out that I can give external links or links to pdf a different styling:

Code: Select all

a[href$=".pdf"]
{
	target: "_blank";
	background: url('../Icons/PDF.png') no-repeat 100% 0;
	background-size: 30px 14px;
	padding-right: 40px;
}
NorthEast
Master Propellus Maximus
Posts: 6426
Joined: Mon Mar 05, 2007 8:33 am

Re: Set default value for hyperlink target frame

Post by NorthEast »

Interesting, I'd never heard of target-name in CSS - it looks like it's just a proposal.

Whilst <base> should work, it looks like you need to specify the href as well as the target. This works for me:

Code: Select all

<base href="https://madcapsoftware.com/" target="_blank" /> 
You'd have to add <base> to the master page (rather than the topic), to get it to be included in the output.
Post Reply