From 65938de7d247bcce6027df547e395ed1eefff001 Mon Sep 17 00:00:00 2001 From: Sonja Broda Date: Sun, 28 Jul 2019 16:03:52 +0200 Subject: [PATCH] Update template annotations --- site/templates/about.php | 2 ++ site/templates/album.php | 2 ++ site/templates/default.php | 2 ++ site/templates/home.php | 2 ++ site/templates/note.php | 2 ++ site/templates/notes.php | 2 ++ site/templates/photography.php | 2 ++ 7 files changed, 14 insertions(+) diff --git a/site/templates/about.php b/site/templates/about.php index daa6165..5140e6b 100755 --- a/site/templates/about.php +++ b/site/templates/about.php @@ -2,6 +2,8 @@ /** * Templates render the content of your pages. * They contain the markup together with some control structures like loops or if-statements. + * The `$page` variable always refers to the currently active page. + * To fetch the content from each field we call the field name as a method on the `$page` object, e.g. `$page->title()`. * This example templates only echos the field values from the content file and doesn't need any special logic from a controller. * Snippets like the header, footer and intro contain markup used in multiple templates. They also help to keep templates clean. * More about templates: https://getkirby.com/docs/guide/templates/basics diff --git a/site/templates/album.php b/site/templates/album.php index aa6b731..f9d3cb4 100755 --- a/site/templates/album.php +++ b/site/templates/album.php @@ -2,6 +2,8 @@ /** * Templates render the content of your pages. * They contain the markup together with some control structures like loops or if-statements. + * The `$page` variable always refers to the currently active page. + * To fetch the content from each field we call the field name as a method on the `$page` object, e.g. `$page->title()`. * This example template makes use of the `$gallery` variable defined in the `album.php` controller * and the `cover()` method defined in the `album.php` page model. * Snippets like the header and footer contain markup used in multiple templates. They also help to keep templates clean. diff --git a/site/templates/default.php b/site/templates/default.php index 8be1bac..a260d6e 100755 --- a/site/templates/default.php +++ b/site/templates/default.php @@ -2,6 +2,8 @@ /** * Templates render the content of your pages. * They contain the markup together with some control structures like loops or if-statements. + * The `$page` variable always refers to the currently active page. + * To fetch the content from each field we call the field name as a method on the `$page` object, e.g. `$page->title()`. * * This default template must not be removed. It is used whenever Kirby cannot find a template with the name of the content file. * Snippets like the header, footer and intro contain markup used in multiple templates. They also help to keep templates clean. * More about templates: https://getkirby.com/docs/guide/templates/basics diff --git a/site/templates/home.php b/site/templates/home.php index 2d268b6..85075f4 100755 --- a/site/templates/home.php +++ b/site/templates/home.php @@ -2,6 +2,8 @@ /** * Templates render the content of your pages. * They contain the markup together with some control structures like loops or if-statements. + * The `$page` variable always refers to the currently active page. + * To fetch the content from each field we call the field name as a method on the `$page` object, e.g. `$page->title()`. * This home template renders content from others pages, the children of the `photography` page to display a nice gallery grid. * Snippets like the header and footer contain markup used in multiple templates. They also help to keep templates clean. * More about templates: https://getkirby.com/docs/guide/templates/basics diff --git a/site/templates/note.php b/site/templates/note.php index fef72bf..575895e 100755 --- a/site/templates/note.php +++ b/site/templates/note.php @@ -3,6 +3,8 @@ * Templates render the content of your pages. * They contain the markup together with some control structures like loops or if-statements. * This template is responsible for rendering all the subpages of the `notes` page. + * The `$page` variable always refers to the currently active page. + * To fetch the content from each field we call the field name as a method on the `$page` object, e.g. `$page->title()`. * Snippets like the header and footer contain markup used in multiple templates. They also help to keep templates clean. * More about templates: https://getkirby.com/docs/guide/templates/basics */ diff --git a/site/templates/notes.php b/site/templates/notes.php index 6a49766..9327841 100755 --- a/site/templates/notes.php +++ b/site/templates/notes.php @@ -2,6 +2,8 @@ /** * Templates render the content of your pages. * They contain the markup together with some control structures like loops or if-statements. + * The `$page` variable always refers to the currently active page. + * To fetch the content from each field we call the field name as a method on the `$page` object, e.g. `$page->title()`. * This template lists all all the subpages of the `notes` page with their title date sorted by date and links to each subpage. * Snippets like the header, footer and intro contain markup used in multiple templates. They also help to keep templates clean. * More about templates: https://getkirby.com/docs/guide/templates/basics diff --git a/site/templates/photography.php b/site/templates/photography.php index 2c8f111..fda077b 100755 --- a/site/templates/photography.php +++ b/site/templates/photography.php @@ -2,6 +2,8 @@ /** * Templates render the content of your pages. * They contain the markup together with some control structures like loops or if-statements. + * The `$page` variable always refers to the currently active page. + * To fetch the content from each field we call the field name as a method on the `$page` object, e.g. `$page->title()`. * This template lists all all the subpages of the `phototography` page with title and cover image. * Snippets like the header, footer and intro contain markup used in multiple templates. They also help to keep templates clean. * More about templates: https://getkirby.com/docs/guide/templates/basics