3214 Posts in 848 Topics by 810 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 334 Views |
-
two or more IDs on <% control ChildrenOf(right_here) ??

22 April 2012 at 7:55am
Hi, I'm new on SilverStripe, and I want to use it on my portfolio, I'm a webdesigner
I have this structure:-Home
-Contact
-Projects
--Identity
---1
---2
---3
--Packaging
---a
---b
---c
--Wayfinding
---i
---ii
---iii
I'm using a custom subtemplate for HOME and I want it to display a grid or table with all the projects I have done:PROJECTS
1 2 3 a b
c i ii iiiis there a page control to get all the grandchildren from "Projects", I've read http://doc.silverstripe.org/sapphire/en/reference/built-in-page-controls but I couldn't find anything, also I want them to apear in random order, that's why I'm looking for one instruction instead of writing:
<% control ChildrenOf(__________)%>
for every grandchildren in order to achieve it
Thanks
and sorry for my really lame english =/
-
Re: two or more IDs on <% control ChildrenOf(right_here) ??

28 April 2012 at 2:56am
You'd need to do <% control ChildrenOf("Projects") %> <% control Children %> Your COde <% end_control %><% end_control %>
Remember once you're in a control loop any method available to that control are exposed. So once you're in ChildrenOf("Projects") anything available on Project is available to you
| 334 Views | ||
|
Page:
1
|
Go to Top |


