Skip to content

Commit

Permalink
Phoenix: added temporary dynamic title per-action
Browse files Browse the repository at this point in the history
  • Loading branch information
williamn committed Nov 28, 2015
1 parent 6a6081d commit 33f2523
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion phoenix/notejam/web/controllers/notes_controller.ex
Expand Up @@ -2,6 +2,6 @@ defmodule Notejam.NotesController do
use Notejam.Web, :controller

def index(conn, _params) do
render conn, "index.html"
render conn, "index.html", title: "All notes (8)"
end
end
2 changes: 1 addition & 1 deletion phoenix/notejam/web/controllers/users_controller.ex
Expand Up @@ -2,6 +2,6 @@ defmodule Notejam.UsersController do
use Notejam.Web, :controller

def new(conn, _params) do
render conn, "new.html"
render conn, "new.html", title: "Sign Up"
end
end
4 changes: 2 additions & 2 deletions phoenix/notejam/web/templates/layout/app.html.eex
Expand Up @@ -8,7 +8,7 @@
<!-- Basic Page Needs
================================================== -->
<meta charset="utf-8">
<title>Notejam</title>
<title>Notejam: <%= @title %></title>
<meta name="description" content="">
<meta name="author" content="">

Expand Down Expand Up @@ -36,7 +36,7 @@
</div>
</div>
<div class="sixteen columns">
<h1 class="bold-header"><a href="<%= notes_path(@conn, :index) %>" class="header">note<span class="jam">jam: </span></a> <span>All notes (8)</span></h1>
<h1 class="bold-header"><a href="<%= notes_path(@conn, :index) %>" class="header">note<span class="jam">jam: </span></a> <span><%= @title %></span></h1>
</div>
<div class="three columns">
<h4 id="logo">My pads</h4>
Expand Down

0 comments on commit 33f2523

Please sign in to comment.