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.

Data Model Questions /

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

Controlling pages in groups of certain size

Go to End

10 Posts   3517 Views


Community Member, 17 Posts

7 February 2009 at 8:21am

Got it!

I modified function Grouping() to be this:

	function Grouping() { 
		return (($this->iteratorPos % 6 == 0) && ($this->iteratorPos != 0)); 

and modified the relevant stuff in the template to be:

<div id="group1">
<% control MyChildren %>
	<% if Grouping %>
		<div id="group{$GroupNum}">
	<% end_if %>
	<p>Child: $Title</p>
	<% if Last %>
	<% end_if %>
<% end_control %>

Works like a charm! Thanks so much for your help. I'll post a link to the page you guys helped me make after its done!

BLU42 Media

Community Member, 71 Posts

7 February 2009 at 9:47am

Nice work simplifying that a bit!


Go to Top