These are chat archives for COCOPi/cockpit

29th
Apr 2016
crealx
@crealx
Apr 29 2016 13:08
Hi everybody
Peter Brinck
@peterbrinck
Apr 29 2016 13:08
Hi
crealx
@crealx
Apr 29 2016 13:08
I'm switching to cockpit next...
and i can't use the shortcut code for collection :(
Call to undefined function collection()
with this code :
<?php foreach(collection("posts")->find() as $item): ?> <div> <?php echo $item["title"];?> </div> <?php endforeach;?> Just one item
`<?php foreach(collection("posts")->find() as $item): ?> <div> <?php echo $item["title"];?> </div> <?php endforeach;?>
perhaps the code has changed for loop through a collection... it did work in cockpit before :(
crealx
@crealx
Apr 29 2016 13:44
does someone know how to loop through a collection in Cockpit Next ? :worried: