Class: Spree::Pages::SearchResults
Instance Method Summary
collapse
Methods inherited from Spree::Page
#create_preview, #custom?, #display_name, #duplicate, #layout_sections?, #promote, #store, #theme
#preview?
Instance Method Details
#customizable? ⇒ Boolean
38
39
40
|
# File 'app/models/spree/pages/search_results.rb', line 38
def customizable?
true
end
|
#default_sections ⇒ Object
#icon_name ⇒ Object
4
5
6
|
# File 'app/models/spree/pages/search_results.rb', line 4
def icon_name
'search'
end
|
#page_builder_url ⇒ Object
8
9
10
11
12
13
14
15
16
17
18
|
# File 'app/models/spree/pages/search_results.rb', line 8
def page_builder_url
return unless page_builder_url_exists?(:search_path)
Spree::Core::Engine.routes.url_helpers.search_path(
q: 'test',
theme_id: theme.id,
page_preview_id: page_preview&.id,
theme_preview_id: theme_preview&.id,
locale: I18n.locale
)
end
|
#preview_url(theme_preview = nil, page_preview = nil) ⇒ Object
20
21
22
23
24
25
26
27
28
29
|
# File 'app/models/spree/pages/search_results.rb', line 20
def preview_url(theme_preview = nil, page_preview = nil)
return unless page_builder_url_exists?(:search_path)
Spree::Core::Engine.routes.url_helpers.search_path(
q: 'test',
theme_id: theme.id,
page_preview_id: page_preview&.id,
theme_preview_id: theme_preview&.id
)
end
|