Add notes about collections

This commit is contained in:
sonja
2020-12-13 12:51:39 +01:00
committed by Bastian Allgeier
parent 89265cd228
commit 0b9ca1d05c
2 changed files with 13 additions and 1 deletions

View File

@@ -1,5 +1,11 @@
<?php
/**
* Collections help with keeping your code DRY
* if you need to reuse the same set up pages, files or users in multiple places across your site.
*
* More about collections:
* http://getkirby.test/docs/guide/templates/collections
*/
return function () {
return page('notes')
->children()

View File

@@ -12,6 +12,12 @@
return function ($page) {
$tag = urldecode(param('tag'));
/**
* We use the collection helper to fetch the notes collection defined in `/site/collections/notes.php`
*
* More about collections:
* http://getkirby.test/docs/guide/templates/collections
*/
$notes = collection('notes');
if (empty($tag) === false) {