Class: Spree::Pages::PostList

Inherits:
Spree::Page show all
Defined in:
app/models/spree/pages/post_list.rb

Constant Summary collapse

DISPLAY_NAME =
Spree.t(:blog).freeze

Instance Method Summary collapse

Methods inherited from Spree::Page

#create_preview, #custom?, #duplicate, #layout_sections?, #preview_url, #promote, #store, #theme

Methods included from Spree::Previewable

#preview?

Instance Method Details

#customizable?Boolean

Returns:

  • (Boolean)


27
28
29
# File 'app/models/spree/pages/post_list.rb', line 27

def customizable?
  true
end

#default_sectionsObject



16
17
18
19
20
21
# File 'app/models/spree/pages/post_list.rb', line 16

def default_sections
  [
    Spree::PageSections::PageTitle.new,
    Spree::PageSections::PostGrid.new
  ]
end

#display_nameObject



23
24
25
# File 'app/models/spree/pages/post_list.rb', line 23

def display_name
  DISPLAY_NAME
end

#icon_nameObject



12
13
14
# File 'app/models/spree/pages/post_list.rb', line 12

def icon_name
  'news'
end

#page_builder_urlObject



6
7
8
9
10
# File 'app/models/spree/pages/post_list.rb', line 6

def page_builder_url
  return unless page_builder_url_exists?(:posts_path)

  Spree::Core::Engine.routes.url_helpers.posts_path
end