$FP. helpers.Html

Summary
$FP. helpers.Html
Functions
linkReturns an HTML link for a specified controller and action
urlReturns a URL for a specified controller and action

Functions

link

function link(options)

Returns an HTML link for a specified controller and action

Parameters

optionsoptions object, see below

Options

routeOptional, default “default” Name of route to construct
staticUrlOptional, default null A url relative to the “static” folder.  If defined, this overrides controller, action and id
controllerOptional, default current controller
actionOptional, default current action
idOptional, default current id
paramsOptional, default null additional params to add to the URL
anchorOptional, default null String to add after “#’ in the URL
textOptional, default generated URL If provided, this will be placed between the resulting <a></a> tags
[others]Any other properties will be added as attributes to the tag

url

function url(options)

Returns a URL for a specified controller and action

Parameters

optionsoptions object, see below

Options

routeOptional, default “default” Name of route to construct
staticUrlOptional, default null A url relative to the “static” folder.  If defined, this overrides controller, action and id
controllerOptional, default current controller
actionOptional, default current action
idOptional, default “”
paramsOptional, default null additional params to add to the URL
anchorOptional, default null String to add after “#’ in the URL
function link(options)
Returns an HTML link for a specified controller and action
function url(options)
Returns a URL for a specified controller and action