Skip to content

Instantly share code, notes, and snippets.

@Soldo
Created April 24, 2012 19:16
Show Gist options
  • Select an option

  • Save Soldo/2482848 to your computer and use it in GitHub Desktop.

Select an option

Save Soldo/2482848 to your computer and use it in GitHub Desktop.
Objective: Display "hello world" in "U ponudi" page. (page "u ponudi" is created in backend in Pages tab)
Obstacle: When I overrode pages/show.html.erb file and modified it so that it displays "Hello World" on body_content_left, I don't get "Hello World" on my screen. I just get the content that i placed before in backedn.
This is the FIRST thing I tried. It's not working:
<% if @page.title == 'U ponudi' %>
<% content_for :body_content_left do %>
<h1>Hello World!</h1>
<% end %>
<% end %>
This is the SECOND thing I tried. It's not working:
<% if @page.title == 'U ponudi' %>
<h1>Hello World!</h1>
<% end %>
And even if I just place
<h1>Hello World!</h1>
inside show.html.erb, that content is not displayed on screen.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment