Add page titles to public pages
This commit is contained in:
@ -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
|
||||||
|
|||||||
@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user