Jump to:

17452 Posts in 4473 Topics by 1971 members


SilverStripe Forums » Archive » Display Projects if Module - "DataObject Relationship Management"

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: 760 Views
  • Cy
    Community Member
    11 Posts

    Display Projects if Module - "DataObject Relationship Management" Link to this post

    Much thanks to all the hard work in developing this beautiful framework/cms! So far, development has been relatively smooth with my first Silverstripe project.

    In order to help clarify my question I'll use examples from the Silverstripe tutorial (part 5).

    Summary: I'd like a ProjectsHolder to filter by Modules a project contains.

    1. A user visits the web site. The homepage shows a list of modules
    2. The user clicks, lets say, the "Sapphire" module
    3. The next page returns a list of all projects that include this module

    Attempt for "gsoc-projects" template

    <% control Children %>
    <% if Modules == Sapphire %>
    <% if MyStudent %>
    <% control MyStudent %>
    $FirstName $Lastname
    <% end_control %>
    <% else %>
    No Student
    <% end_if %>
    <% end_if %>
    <% end_control %>

    Is it just a matter of adding an IF == [Module] clause under the <% control Children %>?

    Also, would a better way be to pass the module name as a url parameter to just one projectHolder page that places the module name? How would this be done?

    Thank you in advance for your help, ideas, and suggestions!


    Found this thread to be useful and I think will solve my problems.

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.