Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » Menu links to other domains

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: 1358 Views
  • Decisive Flow
    Avatar
    Community Member
    73 Posts

    Menu links to other domains Link to this post

    I have just converted out PlanHQ blog to Wordpress and would like to link to it from the main nav. The only solution we can see so far is to put a redirect link in, which is obviously not so good for SEO and a little unintuitive for users.

    Is there a way I can put the link directly to the site? It is blog.planhq.com

    Thanks!

  • Andy
    Avatar
    230 Posts

    Re: Menu links to other domains Link to this post

    You could create a new page type, and override the Link() function to return the link of the page. Eg:

    class BlogRedirector extends Page {
    function Link() {
    return "http://blog.planhq.com";
    }
    }

    Sam, do you think it would be a good idea to override Link on RedirectorPage to link to the destination page?

  • Sam
    Avatar
    Administrator
    679 Posts

    Re: Menu links to other domains Link to this post

    Yes, overriding the Link() method in RedirectorPage would work.

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