Social Links in new 5.7 Version don't open in a new tab / window

Permalink 1 user found helpful
I added a number of social links to my site using the new social links feature of 5.7 but when you click on those links, it opens them in the same window rather than in a new tab / window. Is there any way to change this functionality?

View Replies: View Best Answer
MrKDilkington replied on at Permalink Best Answer Reply 1 Attachment
MrKDilkington
Hi sirhaggus,

You can change the behavior of the Social Links block using a custom template.

I have attached a custom template to do this.

- unzip the attached file into your application\blocks folder
application\blocks\social_links\templates\open_in_new_tab.php
- in edit mode, click on the Social Links block and select Design & Custom Template from the menu
- in the second menu that pops up, click on the gear icon
- in the Custom Template select dropdown, select Open In New Tab
- save
sirhaggus replied on at Permalink Reply
You are the man! Worked like a champ - they should straight up add this to the social links block as a feature moving forward. Thanks for your super fast help with this. I'm sure other folks will want to use this.
HMcCarthy replied on at Permalink Reply
I second that. The attached code in the previous comment works well, but it would be swell if included in C5. I also noticed the Featured block in 5.7 doesn't open in a new tab either.
MrKDilkington replied on at Permalink Reply
MrKDilkington
@eriset

The Feature block accepts internal and external links, so I think that is more of a candidate for a custom template.

Opening Social Links blocks in a new tab by default sounds reasonable.
ramonleenders replied on at Permalink Reply
ramonleenders
+1
MrKDilkington replied on at Permalink Reply
MrKDilkington
This has been changed for the next version.
HMcCarthy replied on at Permalink Reply
You're right. That's what I ended up doing....I copied the original block and added target="_blank" Thanks for the suggestion...you basically taught me how to create custom blocks from this post. Saves me a ton of time. Cheers!