Class: Spree::Pages::TaxonList
Constant Summary
collapse
- DISPLAY_NAME =
Spree.t(:taxonomy_brands_name).freeze
Instance Method Summary
collapse
Methods inherited from Spree::Page
#create_preview, #custom?, #duplicate, #layout_sections?, #preview_url, #promote, #store, #theme
#preview?
Instance Method Details
#customizable? ⇒ Boolean
23
24
25
|
# File 'app/models/spree/pages/taxon_list.rb', line 23
def customizable?
false
end
|
#default_sections ⇒ Object
17
18
19
20
21
|
# File 'app/models/spree/pages/taxon_list.rb', line 17
def default_sections
[
Spree::PageSections::TaxonGrid.new,
]
end
|
#display_name ⇒ Object
27
28
29
|
# File 'app/models/spree/pages/taxon_list.rb', line 27
def display_name
DISPLAY_NAME
end
|
#icon_name ⇒ Object
13
14
15
|
# File 'app/models/spree/pages/taxon_list.rb', line 13
def icon_name
'sort-a-z'
end
|
#page_builder_url ⇒ Object
7
8
9
10
11
|
# File 'app/models/spree/pages/taxon_list.rb', line 7
def page_builder_url
return unless page_builder_url_exists?(:taxonomy_path)
Spree::Core::Engine.routes.url_helpers.taxonomy_path(taxonomy.id)
end
|
#taxonomy ⇒ Object
36
37
38
|
# File 'app/models/spree/pages/taxon_list.rb', line 36
def taxonomy
@taxonomy ||= store.taxonomies.find(taxonomy_id)
end
|
#taxonomy_id ⇒ Object
FIXME: this should use preferences
32
33
34
|
# File 'app/models/spree/pages/taxon_list.rb', line 32
def taxonomy_id
store.taxonomies.first&.id
end
|