Created
May 2, 2014 07:16
-
-
Save anonymous/2979bb4a0bc06bdfe0b6 to your computer and use it in GitHub Desktop.
content for titles
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title><%= content_for?(:title) ? "#{yield(:title)} - Default Site Name" : "Default Site Name" %></title> | |
</head> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<% content_for :title do %>Index of some Page<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
If your template doesn't define a content_for(:title), it will default to the name "Default Site Name". |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment