Method: Scrivito::Configuration.choose_homepage
- Defined in:
- lib/scrivito/configuration.rb
.choose_homepage { ... } ⇒ Object
A callback that can be provided for determining the CMS object to be used when visiting the homepage. See scrivito_route for details on how to define routes. The callback is called once per request and receives the rack environment as its only parameter. By default, the CMS object at the root path (/
) is used as the homepage.
316 317 318 |
# File 'lib/scrivito/configuration.rb', line 316 def choose_homepage(&block) self.choose_homepage_callback = block end |