Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End Reverse PHP Increment Re: Reverse PHP Increment

#120192
hotpink
Member

Maybe set the counter to the highest number, and count down.

I took a peek at the Kirby API cheat sheet I came up with this.

$count = $page->count();
foreach($page->children()->visible()->flip() as $article):
$count–;
?>

http://getkirby.com/content/02-docs/kirby-cheatsheet.pdf