Module: Scrivito::RoutingHelper
- Included in:
- ScrivitoHelper
- Defined in:
- lib/scrivito/routing_helper.rb
Overview
The helper contains methods to generate URLs to CMS content. Use #scrivito_path or #scrivito_url when linking or redirecting to CMS objects. These methods are available in boths your views and your controllers.
Instance Method Summary collapse
-
#scrivito_path(target, options = {}) ⇒ String
Returns the (URL-)path for a cms object.
-
#scrivito_url(target, options = {}) ⇒ String
Returns the absolute URL for a cms object.
Instance Method Details
#scrivito_path(target, options = {}) ⇒ String
Returns the (URL-)path for a cms object.
22 23 24 |
# File 'lib/scrivito/routing_helper.rb', line 22 def scrivito_path(target, = {}) CmsRouting.new(request, main_app).path_or_url(target, "path", ) end |
#scrivito_url(target, options = {}) ⇒ String
Returns the absolute URL for a cms object.
38 39 40 |
# File 'lib/scrivito/routing_helper.rb', line 38 def scrivito_url(target, = {}) CmsRouting.new(request, main_app).path_or_url(target, "url", ) end |