Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

fixed render_page_title related documentations in README.md

  • Loading branch information...
commit d889328f3819a91bd640674d7af245e1c2ebf782 1 parent e60c260
Ricky Pai authored February 26, 2012

Showing 1 changed file with 23 additions and 23 deletions. Show diff stats Hide diff stats

  1. 46  README.md
46  README.md
Source Rendered
@@ -24,29 +24,29 @@ gem 'bootstrap_helper', :git => "git://github.com/xdite/bootstrap-helper.git"
24 24
 
25 25
 #### SETUP
26 26
 
27  
-edit your `config/application.rb `
  27
+edit your `config/application.rb ` add to first line
28 28
 
29  
-	SITENAME = "YOUR SITE NAME"
  29
+  SITE_NAME = "YOUR SITE NAME"
30 30
 
31 31
 in  `application.html.erb`, replace `<title>` with 
32 32
 
33  
-	<%= render_page_title %> 
  33
+  <%= render_page_title %> 
34 34
 
35 35
 define page title in your action 
36 36
 
37  
-	def index
38  
-  	  page_title("Posts Index")
39  
-	end
  37
+  def index
  38
+      drop_page_title("Posts Index")
  39
+  end
40 40
 
41 41
 will render 
42  
-	
43  
-	<title>Posts Index &raquo; YOUR SITE NAME</title>
  42
+  
  43
+  <title>YOUR SITE NAME &raquo; Posts Index</title>
44 44
 
45 45
 ### render_list
46 46
 
47 47
 render_list generates ul & li, auto append: "first", "last" class . If link matches current controller and acttion, it will auto add "active" class. Perfact for "menu"
48 48
 
49  
-	<%= render_list :class => "nav" do |li|
  49
+  <%= render_list :class => "nav" do |li|
50 50
          li << link_to(t("menu.topics"), topics_path)
51 51
          li << link_to(t("menu.wiki"), wikis_path )
52 52
          li << link_to(t("menu.sites"), sites_path )
@@ -57,35 +57,35 @@ render_list generates ul & li, auto append: "first", "last" class . If link matc
57 57
 
58 58
 in  `application.html.erb`, replace `<body>` with 
59 59
 
60  
-	<%= render_body_tag %> 
  60
+  <%= render_body_tag %> 
61 61
 
62 62
 render_body_tag auto inserts "controller name" & "action name" in to body class, and generates IE conditional comment.
63 63
 
64  
-	<!--[if lt IE 7 ]>
65  
-	<body class="topics-controller index-action ie6"><![endif]-->
66  
-	<!--[if gte IE 7 ]>
67  
-	<body class="topics-controller index-action ie"><![endif]-->
68  
-	<!--[if !IE]>-->
69  
-	<body class="topics-controller index-action">
70  
-	<!--<![endif]-->
  64
+  <!--[if lt IE 7 ]>
  65
+  <body class="topics-controller index-action ie6"><![endif]-->
  66
+  <!--[if gte IE 7 ]>
  67
+  <body class="topics-controller index-action ie"><![endif]-->
  68
+  <!--[if !IE]>-->
  69
+  <body class="topics-controller index-action">
  70
+  <!--<![endif]-->
71 71
 
72 72
 ### breadcrumb
73 73
 
74 74
 in  `application.html.erb`, place this helper
75 75
 
76  
-	<%= render_breadcrumb %>
  76
+  <%= render_breadcrumb %>
77 77
 
78 78
 drop breadcrumb in your action 
79 79
 
80  
-	def show
81  
-	  @post = Posts.find(params[:id])
82  
-	  drop_breadcrumb("Posts", posts_path)
83  
-	  drop_breadcrumb(@post.title)
  80
+  def show
  81
+    @post = Posts.find(params[:id])
  82
+    drop_breadcrumb("Posts", posts_path)
  83
+    drop_breadcrumb(@post.title)
84 84
     end
85 85
 
86 86
 it will generate breadcrumb with link for you
87 87
 
88  
-	Home / Post / YourPostTitle
  88
+  Home / Post / YourPostTitle
89 89
 
90 90
 ### notice_message
91 91
 

0 notes on commit d889328

Please sign in to comment.
Something went wrong with that request. Please try again.