Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #12 from etdsoft/hide_chapters

Only display the sidebar if it has some content
  • Loading branch information...
commit 6bdb5a82ed29d30fd49dfd5855ea92ce414e41cd 2 parents 283987c + 75bf694
@wagenet wagenet authored
Showing with 9 additions and 1 deletion.
  1. +9 −1 lib/guides/templates/source/layout.html.erb
View
10 lib/guides/templates/source/layout.html.erb
@@ -54,12 +54,20 @@
<h2><%= Guides.meta["title"] %></h2>
<p><%= Guides.meta["description"] %></p>
<% end %>
+ <% if index_items = yield(:index_items).presence %>
<div id="subCol">
<h3 class="chapter"><img src="images/chapters_icon.gif" alt="" />Chapters</h3>
<ol class="chapters">
- <%= yield(:index_items) %>
+ <%= index_items %>
</ol>
</div>
+ <% else %>
+ <% if sidebar = yield(:sidebar).presence %>
+ <div id="subCol">
+ <%= sidebar %>
+ </div>
+ <% end %>
+ <% end %>
</div>
</div>

0 comments on commit 6bdb5a8

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