Method: Scrivito::ControllerHelper#scrivito_url

Defined in:
app/cms/scrivito/controller_helper.rb

#scrivito_url(target, options = {}) ⇒ String

Note:

scrivito_url is also a helper method.

Returns the absolute URL of a CMS object.

Parameters:

  • target (Obj, Link, Array<Link>, Binary)

    If target is an Array of Links, it must be non-empty. Only the first Link of the Array is used.

  • options (Hash) (defaults to: {})

    include url settings such as path parameters or the protocol.

Returns:

  • (String)


40
41
42
# File 'app/cms/scrivito/controller_helper.rb', line 40

def scrivito_url(target, options = {})
  CmsRouting.new(request, self, scrivito_engine).path_or_url(target, "url", options)
end