Jump to:

23478 Posts in 18941 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » Hyperlinking to DataObjects on a Display Page

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

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

Page: 1
Go to End
Author Topic: 305 Views
  • B00mtastik™
    Community Member
    18 Posts

    Hyperlinking to DataObjects on a Display Page Link to this post

    Hey SS'ers,

    My current dilemma seems to be something I don't exactly even know how to search for it much less know if its even been done before. I know there could be other ways to display what I'm trying to display, but that doesn't satisfy the curiosity of how to do it if I ever needed it, which I do.

    For example I have a profile page that displays all member data in a sort of a directory for an intranet. Some data has been omitted because its not allowed to be seen by all staff. Okay. These members are of course dataobjects sitting in the database.

    Now there are certain departments where those certain staff members are working in, and I would put there name down as part of that department.

    Now, I WANT to be able to hyperlink said name to a matching member dataobject so that when clicked on it brings up the profile page or the directory display page to display all the data of that one member.

    Does anyone know how to go about this?

    The only alternative I know of is to loop the member objects details and display them on each department page with their image and have no linking, and leave the searching of the directory as a separate thing altogether.

    Thanks in advanced.


  • Bambii7
    Community Member
    254 Posts

    Re: Hyperlinking to DataObjects on a Display Page Link to this post

    Checkout custom Controllers. You'll be able to customise a url to point to a specific function like renderMember() with something like mysite.com/member/$ID

    inside renderMember if you use $this->renderWith( ) you'll be able to control the display

    checkout similar http://stackoverflow.com/questions/13375517/how-silverstripe-custom-controller-and-view-template-works

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.