Add page titles to public pages

This commit is contained in:
Thelonius Kort
2023-01-19 22:17:26 +01:00
parent 8d1c08bfb4
commit c7fe690599
2 changed files with 4 additions and 4 deletions

View File

@ -5,11 +5,11 @@ defmodule OutlookWeb.ArtikelController do
def index(conn, _params) do def index(conn, _params) do
artikel = Artikel.list_artikel() artikel = Artikel.list_artikel()
render(conn, :index, artikel: artikel) render(conn, :index, artikel: artikel, page_title: "Artikel")
end end
def show(conn, %{"id" => id}) do def show(conn, %{"id" => id}) do
artikel = Artikel.get_artikel!(id) artikel = Artikel.get_artikel!(id)
render(conn, :show, artikel: artikel) render(conn, :show, artikel: artikel, page_title: artikel.title)
end end
end end

View File

@ -5,12 +5,12 @@ defmodule OutlookWeb.AutorController do
def index(conn, _params) do def index(conn, _params) do
autoren = Autoren.list_autoren() autoren = Autoren.list_autoren()
render(conn, :index, autoren: autoren) render(conn, :index, autoren: autoren, page_title: "Autoren")
end end
def show(conn, %{"id" => id}) do def show(conn, %{"id" => id}) do
autor = Autoren.get_autor!(id) autor = Autoren.get_autor!(id)
# artikel = Autoren.list_artikel(autor) # artikel = Autoren.list_artikel(autor)
render(conn, :show, autor: autor) render(conn, :show, autor: autor, page_title: autor.name)
end end
end end