Method: Scrivito::ControllerHelper#scrivito_path

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

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

Note:

scrivito_path is also a helper method.

Returns the (URL-)path 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)


22
23
24
# File 'app/cms/scrivito/controller_helper.rb', line 22

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