rubyonrailsin

A Ruby and Rails talk

Monday, March 15, 2010


[spree-user] Adding custom titles to pages?

by rubyonrailsin 0 comments

Tag


Share this post:
Design Float
StumbleUpon
Reddit

I want to dynamically add custom titles to pages. This is currently
done on the product/show pages in Spree by default.

I have a store model. On my store/show page, I included this code:
<% content_for :title do %>
<%= @store.name %> ::
<% end %>

This should work, and does work on a standard Rails app. It's not
working in Spree. I'm assuming it's got something to do with the
title being tied to the app_configuration.rb file, but I'm not sure.

I tried the following on my store/show page and it does work. The
only change here is that I changed ":title" to ":head"
<% content_for :head do %>
<%= @store.name %> ::
<% end %>

So this is telling me that it is an issue specific to the title.

I thought I would find a solution on the products/show page, but I'm
not seeing anything on that page that indicates where the custom
titles are coming from.

Any tips?

Thanks,
Mike

--
You received this message because you are subscribed to the Google Groups "Spree" group.
To post to this group, send email to spree-user@googlegroups.com.
To unsubscribe from this group, send email to spree-user+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/spree-user?hl=en.

No comments:

Post a Comment

Subscribe feeds via e-mail

Blog Archive