Learn how to create and use pages in your Spree storefront
Page | Description | Class | URL |
---|---|---|---|
Home | The main landing page of your store | Spree::Pages::Homepage | / |
Product Details | Individual product display page | Spree::Pages::ProductDetails | /products/:id |
Taxon | Shows products filtered by taxon | Spree::Pages::Taxon | /t/:permalink |
Search Results | Displays search results for products | Spree::Pages::SearchResults | /search |
Shop All | Shows all products | Spree::Pages::ShopAll | /products |
Blog | Shows your store’s blog posts and articles | Spree::Pages::PostList | /posts |
Post | Individual blog post | Spree::Pages::Post | /posts/:permalink |
Password | Password page, when password protected storefront is enabled | Spree::Pages::Password | / |
Admin -> Storefront -> Pages
and clicking on the New Page
button. More on this in the Create a Landing Page guide. Each custom landing page can be customized via page builder.
Spree::PickupLocation
and added some data to the database. Now you want to create a page that displays these pickup locations.
First, let’s add a route for the new page.
config/initializers/spree.rb
file:
render_page
is a helper method defined in the Spree::PageHelper module that renders the page. It fetches all page sections and renders them one by one in the order they are set in the page builder by store staff.
Passing pickup_locations
variable to the render_page
method allows you to use it in the page sections templates, eg.