Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Archive /

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo

Display Projects if Module - "DataObject Relationship Management"

Go to End



Community Member, 11 Posts

23 October 2008 at 6:57am

Edited: 23/10/2008 6:57pm

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.