Add notes about collections
This commit is contained in:
@@ -1,5 +1,11 @@
|
|||||||
<?php
|
<?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 function () {
|
||||||
return page('notes')
|
return page('notes')
|
||||||
->children()
|
->children()
|
||||||
|
@@ -12,6 +12,12 @@
|
|||||||
return function ($page) {
|
return function ($page) {
|
||||||
|
|
||||||
$tag = urldecode(param('tag'));
|
$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');
|
$notes = collection('notes');
|
||||||
|
|
||||||
if (empty($tag) === false) {
|
if (empty($tag) === false) {
|
||||||
|
Reference in New Issue
Block a user