Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

use instead of _target blank

Go to End

3 Posts   3549 Views


Community Member, 4 Posts

24 October 2010 at 5:26pm

I'm a newbee and just proved it by posting this first in the wrong forum;-) So much to learn!

I am very impressed with SilverStripe so far. One thing that really impresses me is the amount of valid code!

One place puts out invalid code and I think it would be a trivial fix if I knew where to change the code. Perhaps there is a good reason for using a target _blank but i was wondering if it could instead use "; return false;" When I am editing a page, click to insert a link, and click the checkbox to open a new window it inserts the html code _target blank. The page is an xtml page and therefore it doesn't validate. If I click the html editor button and fix the html when I click insert the code gets stripped.

Is that a simple fix? Could someone tell me how to do it?



Community Member, 271 Posts

25 October 2010 at 12:40am

You can create a textparser to replace all target="_blank" in Content with a class="external" and use jQuery to open those links in a new window..


Community Member, 4 Posts

25 October 2010 at 12:26pm

Thanks Martijn

That looks like the info I was looking for. Will take a while till I'm up to speed enough to attempt it though;-) For now I will just add a note to right click to open links in a new window.