Jump to:

3392 Posts in 976 Topics by 852 members

Template Questions

SilverStripe Forums » Template Questions » Virtual Page looses functionality of original page

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

Page: 1
Go to End
Author Topic: 557 Views
  • spierala
    Avatar
    Community Member
    80 Posts

    Virtual Page looses functionality of original page Link to this post

    Hello all,
    For the Page Type "Page" I defined a function (myaction) in the Controller.
    I can access the function normally via
    http://www.mydomain.com/mypage/myaction

    That just don´t work for Virtual Pages, that mirror a page of type "Page".
    A call like this:
    http://www.mydomain.com/my-virtual-page/myaction
    will show up the "Page not found"-Page...

    So somehow a virtual page doesn´t "inherit" the functions defined in the controller of the original page type?

    Is there a good way to solve this?
    Many thanks,
    Flo

  • spierala
    Avatar
    Community Member
    80 Posts

    Re: Virtual Page looses functionality of original page Link to this post

    Does anyone know something about that? Any help would highly appreciated
    Florian

  • inCharge
    Avatar
    Community Member
    102 Posts

    Re: Virtual Page looses functionality of original page Link to this post

    Hi Florian

    What is VirtualPage for? I have never found a use for it, but maybe I just don't understand its purpose.

    Why would you want two identical pages on a website? Sometimes I have used RedirectorPage when a page needs to appear on 2 different menus (e.g. because it's not clear to visitors where it belongs), but I'd always want it to have one master URL and one 'alias' that gets redirected. The only practical difference with VirtualPage I can see is that the URL of the copy stays in the browser address bar. In what situation would you want that?

    Thanks,
    Jules

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