3212 Posts in 847 Topics by 809 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1914 Views |
-
How to use DataObjectSet->GroupedBy() ?

30 July 2009 at 2:05am Last edited: 30 July 2009 2:07am
Hi!
How does the GroupedBy work?
Items returns a DataObjectSet...I just have these lines, which do not work...
<% control Items.GroupedBy(Title) %>
<% control Children %>
<div class="item $ClassName">
<h3>$Title</h3>
<h4>$Role<br />$FirstName $LastName</h4>
<p>$Phone<br />$Fax<br />Email</p>
</div>
<% end_control %>
<% end_control %>Any ideas?
Thanks
Malte -
Re: How to use DataObjectSet->GroupedBy() ?

30 July 2009 at 9:18am
Hmm can't say I have ever tried to use GroupedBy in a template file. If that doesn't work you might want to try:
function GroupedSomething() {
$children = $this->Children();
if($children) $children->groupBy('Title');
return $children;
} -
Re: How to use DataObjectSet->GroupedBy() ?

17 November 2009 at 3:37am
I have a similar issue.
When I use $dataSet->groupBy('column-name') I get a blank page.
When I remove the groupBy method the page displays
-
Re: How to use DataObjectSet->GroupedBy() ?

17 November 2009 at 3:45am
A while a go I got it working, but if I remember it corretly. It was only working with pages.
| 1914 Views | ||
|
Page:
1
|
Go to Top |


