[SOLVED° I guess I found the answer myself ... using Deface Overrides is
fine, I created an switch_locale rb script in overrides w same name as
:name stated in :name => "switch_locale",... I only have to take care
about the correct selector : "ul#nav_bar", should be "ul#nav-bar" ... !!


Le samedi 16 février 2013 16:35:04 UTC+1, Erwin a écrit :
I am trying to use Deface for the first time and I need some guidance :

I would like to insert a specific partial (
/shared/switch_locale.html.haml ) inside the Spree ul#nav-bar :

<nav id="top-nav-bar" class="columns ten">
<ul id="nav-bar" class="inline" data-hook>
<li id="search-bar" data-hook>
<%= render :partial => 'spree/shared/search' %>
</li>
</ul>
</nav>

using Deface Overrides , I guess I should write the following, according
to the doc, but where should I write it ? ( in a script in overrides ?
named ? )

Deface::Override.new(:virtual_path => "spree/shared/°nav_bar",
:name => "switch_locale",
:insert_after => "ul#nav_bar",
:partial => "shared/switch_locale")

If I want to use the Deface DSL, how this should be rewritten ?
I tried to add the following haml code in a script
overrides/spree/shared/_nav_bar.html.haml.deface, but got syntax error w
the partial ...

/
insert_top 'ul#nav-bar' :partial => "shared/switch_locale"

any guidance welcome ...
--
You received this message because you are subscribed to the Google Groups "Spree" group.
To unsubscribe from this group and stop receiving emails from it, send an email to spree-user+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupspree-user @
categoriesrubyonrails
postedFeb 16, '13 at 4:17p
activeFeb 16, '13 at 4:17p
posts1
users1
websitespreecommerce.com
irc#RubyOnRails

1 user in discussion

Erwin: 1 post

People

Translate

site design / logo © 2022 Grokbase