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   4328 Views

Avatar
grilldan

29 August 2008 at 9:27am (Last edited: 29 August 2008 4:29pm), Community Member, 135 Posts

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

27 September 2008 at 1:39am (Last edited: 27 September 2008 1:40am), Community Member, 48 Posts

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

27 September 2008 at 10:48am Community Member, 470 Posts

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

Avatar
woodb2

28 September 2008 at 4:44am Community Member, 48 Posts

Thanks, that did the trick.