+ Installation +
++ Usage +
+
+ To start using ember-page-title, add the name of your application into
+
+ application.hbs
+
+
+ This sets the title for your application. When your application loads, you should see the title “{{@model.title + }}” appear in the window. Try changing the value below to change the title of this page. +
+ + +
+ {{highlight '{{page-title "' @model.title '"}}'}}
+
+ + By default, using the helper will allow an interaction where additional titles are appended to the root: +
+
+ {{highlight '{{page-title "' @model.title '"}}'}}
+
+
+ {{highlight '{{page-title "Posts"}}'}}
+
+
+ {{highlight '{{page-title @model.post.title}}'}}
+
+
+ You can change the separator by specifying the
+
+
+ separator
+
+
+ attribute.
+
+ {{highlight '{{page-title "' @model.title '" separator=" > "}}'}}
+
+
+ {{highlight '{{page-title "Posts"}}'}}
+
+
+ {{highlight '{{page-title @model.post.title}}'}}
+
+ + Separators can be changed at arbitrary levels: +
+
+ {{highlight '{{page-title "' @model.title '" separator=": "}}'}}
+
+
+ {{highlight '{{page-title "Posts" separator=" > "}}'}}
+
+
+ {{highlight '{{page-title @model.post.title}}'}}
+
+
+ Titles can be prepended to the parent, by setting the
+
+
+ prepend
+
+
+ attribute to
+
+ {{highlight 'true'}}
+
+ .
+
+ {{highlight '{{page-title "' @model.title '" prepend=true}}'}}
+
+
+ {{highlight '{{page-title "Posts"}}'}}
+
+
+ {{highlight '{{page-title @model.post.title}}'}}
+
+ + This allows one to swap the order at arbitrary levels: +
+
+ {{highlight '{{page-title "' @model.title '"}}'}}
+
+
+ {{highlight '{{page-title "Posts" prepend=true}}'}}
+
+
+ {{highlight '{{page-title @model.post.title}}'}}
+
+
+ And for special templates that need to complete control over the title, set the
+
+
+ replace
+
+
+ attribute to
+
+ {{highlight 'true'}}
+
+ . This will only apply for that level.
+
+ {{highlight '{{page-title "' @model.title '"}}'}}
+
+
+ {{highlight '{{page-title "Posts" replace=true}}'}}
+
+
+ {{highlight '{{page-title @model.post.title}}'}}
+
+ + In addition, there's no limit to the amount of titles you can put in a route: +
+
+ {{highlight '{{page-title "' @model.title '"}}'}}
+
+
+ {{highlight '{{page-title "Posts"}}'}}
+
+
+ {{highlight '{{page-title @model.post.title}}'}}
+
+ + Dynamic tokens are available by providing multiple parameters to the helper: +
+
+ {{highlight
+ '{{page-title @model.title " (" @model.post.title ")"}}'
+ }}
+
+