Search code examples
titlespree

How to remove the site name from title in spree?


In Spree > Configuration the Site Name is what is set in the tag of your website. It renders in your browser’s title bar on every page of the public-facing area of the site. I want to remove the site name from titles on my website. I tried to remove it but when I click update after deleting it from text area in Spree > Configuration (as shown in image) it shows up again after updating.

How can I remove it without going into coding from spree admin panel?


Solution

  • You store configuration is stored inside of a Spree::Store model. This way you can have multiple storefronts. For example, what if you have a clothing brand that sells mens clothing and another brand that sells woman's clothing? This was the purpose behind the Spree::Store model; which came from the spree_multi_store gem.

    Anywho, if you would like to update the store information, you can do it from the admin as @arv details. If you want to update it from the rails console:

    store = Spree::Store.current
    store.name = 'My New Store Name'
    store.save