diff --git a/site/blueprints/pages/author.yml b/site/blueprints/pages/author.yml
index ad0cf12..879435b 100644
--- a/site/blueprints/pages/author.yml
+++ b/site/blueprints/pages/author.yml
@@ -10,7 +10,10 @@ tabs:
fields:
presentation:
extends: fields/body
- help: Optionnelle
+ label: Présentation
+ help: |
+ Optionnelle, sans mention du poste. Peut inclure un lien.
+ Exemple : "Co-fondateur des éditions [Athom](http://www.athom.xyz/)."
texts:
label: Textes
type: pages
diff --git a/site/blueprints/users/author.yml b/site/blueprints/users/author.yml
deleted file mode 100644
index 04e5565..0000000
--- a/site/blueprints/users/author.yml
+++ /dev/null
@@ -1,25 +0,0 @@
-title: Auteur
-description: Droits de lecture et écriture de certaines pages.
-image:
- icon: pen
- color: "#FFF"
-
-permissions:
- access:
- *: false
- files:
- *: false
- languages:
- *: false
- pages:
- *: false
- site:
- *: false
- user:
- *: false
- users:
- *: false
-
-fields:
- presentation:
- type: writer
diff --git a/site/config/config.php b/site/config/config.php
index b173029..1b90d2f 100644
--- a/site/config/config.php
+++ b/site/config/config.php
@@ -18,7 +18,6 @@ return array(
]
],
'routes' => array(
- require __DIR__ . '/routes/virtual-author.php',
require __DIR__ . '/routes/virtual-category.php',
require __DIR__ . '/routes/send-newsletter.php',
),
diff --git a/site/config/routes/virtual-author.php b/site/config/routes/virtual-author.php
deleted file mode 100644
index 0a067a1..0000000
--- a/site/config/routes/virtual-author.php
+++ /dev/null
@@ -1,25 +0,0 @@
- 'auteurs/(:any)',
- 'action' => function ($slug) {
- $kirby = kirby();
- $author = getAuthorBySlug($slug);
-
- return Page::factory(
- [
- 'slug' => '',
- 'template' => 'author',
- 'model' => 'authors',
- 'content' => [
- 'title' => $author->name(),
- 'presentation' => $author->presentation(),
- 'author' => $author->name(),
- 'uuid' => Uuid::generate(),
- ]
- ]
- );
- }
-];
diff --git a/site/plugins/helpers/index.php b/site/plugins/helpers/index.php
index c01e7ad..c52d137 100644
--- a/site/plugins/helpers/index.php
+++ b/site/plugins/helpers/index.php
@@ -23,15 +23,9 @@ function setTitleFontSizeClass($title, $level = 'h1')
function getAuthorBySlug($slug)
{
- $kirby = kirby();
- $author = '';
- foreach ($kirby->users() as $user) {
-
- if (Str::slug($user->name()) === $slug) {
-
- $author = $user;
- }
- }
+ $site = site();
+ $authors = page("auteurs")->children();
+ $author = $authors->find($slug);
return $author;
}
diff --git a/site/templates/author.php b/site/templates/author.php
index bd2acf8..d002cf9 100644
--- a/site/templates/author.php
+++ b/site/templates/author.php
@@ -1,13 +1,16 @@
-
-
-
- = $page->title() ?>
- = $page->presentation() ?>
+
+
+
+ = $page->title() ?>
+ = $page->presentation() ?>
+
+
+
textes :
-
+
grandChildren() as $article): ?>
author()->toPage()->title()->value() == $page->title()->value()): ?>
@@ -19,17 +22,14 @@
-
-
-
-
+
+
+
\ No newline at end of file
diff --git a/site/templates/error.php b/site/templates/error.php
new file mode 100644
index 0000000..bda07bd
--- /dev/null
+++ b/site/templates/error.php
@@ -0,0 +1,16 @@
+
+
+
+ true), slots: true) ?>
+
+ ">Page introuvable
+ Retour à l'accueil
+
+
+
+ = $page->body() ?>
+
+
+
+
+
\ No newline at end of file
diff --git a/site/templates/linear.php b/site/templates/linear.php
index efc503e..796f743 100644
--- a/site/templates/linear.php
+++ b/site/templates/linear.php
@@ -12,6 +12,7 @@
+
= $page->body() ?>