Jump to:

17691 Posts in 4607 Topics by 2180 members

General Questions

SilverStripe Forums » General Questions » Redirect page to open in a new window

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

Moderators: martimiz, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba

Page: 1
Go to End
Author Topic: 1392 Views
  • africansafari
    Avatar
    Community Member
    27 Posts

    Redirect page to open in a new window Link to this post

    Hi folks,

    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.

    I know this was covered in an archived message .... http://www.silverstripe.org/archive/show/156170#post156170 .... and have found the navigation template and insert <% if is_a(RedirectorPage) %> target="_blank" <% end_if %> however unsure about how to put this in an <a> tag correctly ???

    Any help much appreciated

    Cheers

    Claire

  • Mo
    Avatar
    Community Member
    445 Posts

    Re: Redirect page to open in a new window Link to this post

    I havent used this, but I imagine it would be something like:

    <a href="$Link" <% if is_a(RedirectorPage) %>target="_blank"<% end_if %>>$MenuTitle</a>

    Mo

  • dizzystuff
    Avatar
    Community Member
    83 Posts

    Re: Redirect page to open in a new window Link to this post

    Just came across this thread, looking to open redirect page links in a new window - but only external redirections. Code I used successfully is

    <% if is_a(RedirectorPage) %><% if RedirectionType = External %>target="_blank"<% end_if %><% end_if %>

    cheers

    1392 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.