2

I am trying to customize my spree application: I override the nav bar menu like follow:

Deface::Override.new(:virtual_path =>"spree/shared/_nav_bar",
                     :name => "main_menu",
                     :replace =>"nav#top-nav-bar",
                     :text => '<nav  class="navbar navbar-inverse navbar-fixed-top" role="navigation">
  <div class="container">
    <!-- Brand and toggle get grouped for better mobile display -->
    <div class="navbar-header">
      <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      <div id="logo"><%= logo %></div>
    </div>
    <!-- Collect the nav links, forms, and other content for toggling -->
    <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
      <ul class="nav navbar-nav navbar-right" data-hook>


    <li  id="search-bar" data-hook>
      <%= render :partial => "spree/shared/search" %>
    </li>
      </ul>
    </div>
    <!-- /.navbar-collapse -->
  </div>
  <!-- /.container -->
</nav>')

I got the bootstrap menu design and still have the search form but the devise logout, my account link go away. how could I show devise links again??

mimou
  • 65
  • 10

1 Answers1

1

I found the solution if any one need it. I added an other override file:

Deface::Override.new(:virtual_path => "spree/shared/_nav_bar",
                     :name => "auth_shared_login_bar",
                     :insert_before => "li#search-bar",
                     :partial => "spree/custom/custom_login_bar",
                     :disabled => false, 
                     :sequence => {:after => "auth_shared_login_bar"}
mimou
  • 65
  • 10