$root = AnimeCommentQuery::create()->findRoot(2);
$html = "<ul>{$root->getComment()}";
foreach ($root->getDescendants() as $post)
{
$html .= '<li style="padding-left: '.$post->getLevel().' em;">';
$html .= $post->getComment();
$html .= ' by '.$post->getIbfMembersRelatedByInsertBy()->getName();
$html .= "</li>";
}
$html .= "</ul>";
echo $html;
I want to paginate the posts but I am not able to do this by:
$root = AnimeCommentQuery::create()->findRoot(2)->paginate(2, 1);
OR
$root = AnimeCommentQuery::create()->paginate(2, 1)->findRoot(2);
Can it be done with standard Pagination from propel? And how?