relationship between three DataObjects

<%- if @topic_view.topic.tags.present? %>
<%= t 'js.tagging.tags' %>: <%- @topic_view.topic.tags.each do |t| %> <%= t %> <%- end %>
<% end %>

Silverstripe Version: 3.6

Question:

Hi everybody. Can you help me with relationship between three DataObjects?
A have three DataObjects: Collect, Circle and Container

Collect1 - Circle1 - Container1
                   - Container2
                   - Container3
         - Circle2 - Container4
                   - Container5
                   - Container6
Collect2 - Circle3 - Container7
                   - Container8
                   - Container9
         - Circle2 - Container4
                   - Container5
                   - Container10
                   - Container11
...

i try a lot of combination but when i print on template

<% control Collect %>
   <% control Circle %>
      <% control Container %>
          ...
      <% end_control %>
   <% end_control %>
<% end_control %>

it always return on Circle2 Container 4 5 6 10 11 but if control Collect2 i need return only 4 5 10 11 is it possible? Problem is that data and sorting comes from another software.

Thanks a lot

Can you post your PHP code? What you’re describing sounds fine, but hard to know what’s going wrong without seeing the model and/or controller.

BTW <% control %> is deprecated SS2 syntax. For SS3 and up you should use either <% loop %> or <% with %>.