<ul class="nav nav-stacked" id="bootstrap-sidebar">

  <% if params[:action] == 'index' %>
    <li><a href="#start">Getting Started</a></li>
    <li class="subitem"><a href="#support">Support</a></li>
    <li class="subitem"><a href="#opensource">Open Source</a></li>
    <li class="subitem"><a href="#headers">HTTP Headers</a></li>
    <li class="subitem"><a href="#timezones">Time Zones</a></li>
  <% else %>
    <li><a href="/docs">Getting Started</a></li>
  <% end %>

  <% if params[:action] == 'channels' %>
    <li><a href="#channels">Channels</a></li>
    <li class="subitem"><a href="#keywords">Keywords</a></li>
    <li class="subitem"><a href="#urls">Base URLs</a></li>
    <li class="subitem"><a href="#api_keys">API Keys</a></li>
    <li class="subitem"><a href="#rate_limits">Rate Limits / Caching</a></li>
    <li class="subitem"><a href="#update">Update Channel Feed</a></li>
    <li class="subitem"><a href="#get_feed">Get Channel Feed</a></li>
    <li class="subitem"><a href="#get_field">Get Channel Field Feed</a></li>
    <li class="subitem"><a href="#get_status">Get Status Updates</a></li>
    <li class="subitem"><a href="#list_public">List Public Channels</a></li>
    <li class="subitem"><a href="#create">Create a Channel</a></li>
    <li class="subitem"><a href="#clear">Clear a Channel</a></li>
    <li class="subitem"><a href="#delete">Delete a Channel</a></li>
    <li class="subitem"><a href="#importer">Importer</a></li>
  <% else %>
    <li><a href="/docs/channels">Channels</a></li>
  <% end %>

  <% if params[:action] == 'charts' %>
    <li><a href="#charts">Charts</a></li>
    <li class="subitem"><a href="#create">Create Charts</a></li>
    <li class="subitem"><a href="#embed">Embed Charts</a></li>
  <% else %>
    <li><a href="/docs/charts">Charts</a></li>
  <% end %>

  <% if params[:action] == 'users' %>
    <li><a href="#users">Users</a></li>
    <li class="subitem"><a href="#get_user">Get User Information</a></li>
    <li class="subitem"><a href="#list_user_channels">List User's Channels</a></li>
  <% else %>
    <li><a href="/docs/users">Users</a></li>
  <% end %>

  <li class="<%= 'active' if params[:action] == 'plugins' %>"><a href="/docs/plugins">Plugins</a></li>
  <li class="<%= 'active' if params[:action] == 'tutorials' %>"><a href="/docs/tutorials">Tutorials</a></li>
  <li class="<%= 'active' if params[:action] == 'errors' %>"><a href="/docs/errors">Error Codes</a></li>
</ul>

