<div id="content">
  <section>
    <h1><%= category.title %></h1>
    <p id="description"><%= category.description %></p>

    <% category.contents.each do |subcategory| %>
      <article>
        <h2><%= link_to subcategory.title, subcategory.path %></h2>

        <% if subcategory.contents.present? %>
          <ul>
          <% subcategory.contents.each do |subsubcategory| %>
            <li><%= link_to subsubcategory.title, subsubcategory.path %></li>
          <% end%>
          </ul>
        <% end %>

      </article>
    <% end %>

  </section>
</div>

<div id="content">
  <section>
    <h1><%= title category.title %></h1>
    <p id="description"><%= category.description %></p>

    <% category.contents.each do |subcategory| %>
      <article>
        <h2><%= link_to subcategory.title, subcategory.path %></h2>

        <% if subcategory.contents.present? %>
          <ul>
          <% subcategory.contents.each do |subsubcategory| %>
            <li><%= link_to subsubcategory.title, subsubcategory.path %></li>
          <% end%>
          </ul>
        <% end %>

      </article>
    <% end %>

  </section>
</div>

Set page title on category page
Set page title on category page
