LemonStand Documentation

resource_url

function resource_url($path, $root_url = true, $add_host_name_and_protocol = false)

The resource_url() function creates URLs relative to the website resources directory. The default location of the website resource directory is /resources, but you can change it on System/Settings/Cms Settings page.

<img src="<?= resource_url('images/home-banner.png') ?>"/>

Parameters:

  • $path - file path in the theme resources directory.
  • $root_url - return URL relative to the LemonStand domain root.
  • $add_host_name_and_protocol - return absolute URL with the host name and protocol.

Returns

Returns string value.

Next: shop:on_addProductReview
Previous: shop:payment_profiles
Return to Reference