Problem with custom link attributes

Hi,

I have some links that open in a new window. I select “Open in a new window” and the rel=“external” attribute is populated automatically.

This is an text stack internal link and should not have rel=“external” attribute:
<a href="page2/" rel="external" title="Page 2" target="_blank">Page 2</a>

When I remove the rel=“external” attribute, I lose the target="_blank" attribute and the link opens in the same window:
<a href="page2/" rel="external" title="Page 2" target="_blank">Page 2</a>

This is an text stack external link and should have rel=“external” attribute:
<a href="https://google.com" rel="external" title="Google website" target="_blank">Google</a>

When I add “nofollow” to an external link, I lose the target="_blank" attribute again:
<a href="https://google.com" rel="external nofollow" title="Google website">Google</a>

This is with a Button Plus Stack. It’s almost there but the target attribute is incomplete:
<a role="button" href="https://google.com" class=" button b-p hov-target right custom not-vault round custom-shape" target="" rel="external me nofollow"><span class="bp-text">More Info...</span></a>

Does anyone else have this issue, and can the folks at Realmac take a look?

Cheers,
Carl

The link tool in RW adds this attribute when you want to open a link in a new tab. This is because the link will be opened external to the current window. What is your concern with having this?

The problem is that RW won’t allow “nofollow” to links that open in a new tab, because the attribute gets overwritten with rel=“external”.

When I change it to rel=“external nofollow”, the link no longer opens in a new tab, because the target attribute gets screwed up.

What if you add the target property by yourself?

RW complains and won’t allow it.

Sss… not nice.

The default theme JavaScript looks for rel=“external” and adds the target property at runtime on client side.

I guess you would have to mimik that and add custom JavaScript to get the same result when you have a rel=“external nofollow” property.

Not at my Mac currently to send you the JavaScript therefore unfortunately…

I rewrote all my social links with custom html and used font awesome 5 svg code for the icons :slightly_smiling_face:

This issue needs to be addressed in the software though.

1 Like

Here’s a workaround for the RW link tool.

Choose URL, and type it in like this, leaving the " off the beginning and end:

https://google.com" rel="nofollow" target=_blank

Make sure Open in New Window is not selected.

https://cl.ly/rsa6

Save, publish, and all is good :slight_smile:

<a href="https://google.com" rel="nofollow" target="_blank" title="Google Website">Google</a>

4 Likes

I really hope that Realmac address (no pun intended) this ASAP in RW7 with an update soon.

1 Like

@dan can you take a look at this?

1 Like

We’re looking into this now, and will get it fixed in a future update!

1 Like

In RW7? …

Not sure yet, it may only be part of the v8 release (as we’re 100% focused on shipping that asap). However, we may back-port it in the future. In the meantime you can use the workaround, or simple write out the HTML.

Cheers
Dan

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.