Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » Redirect Page -> New window

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

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

Page: 1
Go to End
Author Topic: 4322 Views
  • grilldan
    Avatar
    Community Member
    135 Posts

    Redirect Page -> New window Link to this post

    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 %>

  • woodb2
    Avatar
    Community Member
    48 Posts

    Re: Redirect Page -> New window Link to this post

    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.

  • Liam
    Avatar
    Community Member
    470 Posts

    Re: Redirect Page -> New window Link to this post

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

  • woodb2
    Avatar
    Community Member
    48 Posts

    Re: Redirect Page -> New window Link to this post

    Thanks, that did the trick.

    4322 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.