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.

Archive /

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Redirect Page -> New window


Reply


4 Posts   4396 Views

Avatar
grilldan

Community Member, 135 Posts

29 August 2008 at 9:27am

Edited: 29/08/2008 4:29pm

Is there a way with SilverStripe to add a redirect page that will open in a new window? I know there is a redirect page, but that will redirect the current window.

*edit*

Thank you simon_w!

added this to my navigation template =)
<% if is_a(RedirectorPage) %> target="_blank" <% end_if %>

Avatar
woodb2

Community Member, 48 Posts

27 September 2008 at 1:39am

Edited: 27/09/2008 1:40am

I'm trying to do this exact same thing, but not having any luck. I'm not sure where exactly to put the if statement. I added it to my Navigation.ss template, but it's not working properly. Instead of my menu item behaving like it has the target=_blank property, it's displaying target=_blank in the menu.

Avatar
Liam

Community Member, 470 Posts

27 September 2008 at 10:48am

You need to put the if statement inside the <a> tag. Something like this: <a href="url" if statement>title</a>

Avatar
woodb2

Community Member, 48 Posts

28 September 2008 at 4:44am

Thanks, that did the trick.