Webpages usually have links allowing a user to navigate from one page to another. A link in a standard webpage includes a URL pointing to another webpage.
If the user clicks on a link, the browser sends a request containing the URL to a server. In an Intershop 7 site, however, links do not reference other webpages. Instead, Intershop 7 links trigger pipelines which again can generate storefront webpages as a response.
The functions url()
and urlex()
are used in a template to dynamically generate a URL that is part of a link. Any reference in a storefront page needs to be generated by one of these function calls. Use the attribute action for generating that part of a URL that contains information about the storefront name, language/locale, currency, etc. The parameter attribute can be used to extend the URL with additional key-value pairs which can forward additional data to the called pipeline.
The url()
function uses the protocol that triggered the pipeline. Therefore, if the pipeline was triggered via an HTTP request, the URL will use the HTTP protocol. If the pipeline was triggered via HTTPS, then that protocol will be used. By contrast, the urlex()
function allows you to arbitrarily specify a protocol, independently of the one used in the current pipeline request.
url( <action - operation> ) url( <action - operation>,[<parameter - operation>] )
This example shows how to build a link in a storefront page to call a pipeline.
<a href = "#url(action('ViewBasketHistory-Start'))#"> ... link text to be displayed ... </a>
action
This parameter is required.
action - operation
Result of an action()
function call.
parameter
This parameter is optional.
parameter - operation
Result of a parameter()
function call. The parameter()
function may be included as often as needed in this function call.