Jump to:

3460 Posts in 1064 Topics by 739 members

Data Model Questions

SilverStripe Forums » Data Model Questions » Link from virtual page

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

Page: 1
Go to End
Author Topic: 692 Views
  • Stefdv
    Community Member
    110 Posts

    Link from virtual page Link to this post


    i used the tutorial ; http://www.ssbits.com/tutorials/2010/dataobjects-as-pages-part-2-using-model-admin-and-url-segments-to-create-a-product-catalogue/

    Everything is working great, i used it to manage dogs for a breeder. On my Something_show.ss ( a virtual page that displays my dataobject) there's a table displayed containing dogs that are the parents of the actual Dog. ( A pedigree) now i need to link from the objects on the virtual page.


    ( DataObject Dog is the actual dog the breeder owns )
    Dog has_one Pedigree
    Pedigree has_many Dogs

    (DataObject PedigreeDog are the parents, greatparents etc of the Dog, that builds the pedigree )
    Pedigree many_many PedigreeDogs
    PedigreeDog belongs_many_many Pedigrees

    I have only one 'real' page ...'DogPage'. This page shows the Dogs, i can link from a Dog and it show in a virtual page 'DogPage_Show'. The virtual page then shows the details of the dog and the pedigree. Now i want a link on every Pedigree dog to show the details of that dog also.

    Page -> Link DO1 to VirtualPage1 -> Shows details of DO1 and a table containing DO2 ->Link DO2 to VirtualPage2 -> Show details of DO2.

    I hope this makes sence to anybody

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.