> ## Documentation Index
> Fetch the complete documentation index at: https://dokumentation.websale.de/llms.txt
> Use this file to discover all available pages before exploring further.

# URL- (Internet address)

> Output the shop's addresses in the template: main domain, SSL domain, shop directory and the path of the current template, plus the parameters of the current request.

A template does not know under which address it is currently being delivered. It can be reachable via several domains, via HTTP or via HTTPS, and it is located in a directory whose path differs from shop to shop. But links, the `base` element and embedded files need this information.

The `URL-` tags provide it. Four describe addresses of the shop, three more provide information about the parameters with which the current page was requested.

## The addresses of the shop

| Tag | Returns |
| - | - |
| `URL-Homepage` | the main domain of the shop, with protocol |
| `URL-SSLDomain` | the SSL domain, with protocol |
| `URL-Shop` | the root directory of the shop on the web server |

```html theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
<a href="~URL-Homepage~">Zur Startseite</a>
```

> [!NOTE]
>
> `URL-Homepage` returns a complete address including the protocol, for example `https://www.meinshop.de`. The tag is valuable when the shop is reachable via several domains but all links should point to one of them. Without this tag, a visitor who arrived via a secondary domain stays there for all further requests as well.

> [!NOTE]
>
> The main domain is set by the `Domain-!` parameter in the `Basic` section of the shop configuration.

> [!WARNING]
>
> `URL-SSLDomain` additionally works as bracketing, namely when an SSL domain is entered. The previous documentation lists it only as a single tag. The bracketing is useful, because without an SSL domain entered the tag outputs nothing, and an `href` with an empty address leads back to the current page.

> [!NOTE]
>
> The SSL domain is entered by the system administration of WEBSALE AG, not by the designer, because it belongs to the SSL certificate. It must match the main domain: `xyz.de` goes with `https://xyz.de`, `www.xyz.de` goes with `https://www.xyz.de`. The form with `www` is recommended.

> [!NOTE]
>
> `URL-Shop` returns the complete path to the shop directory, that is the domain, intermediate directories and the directory with the shop ID. It depends on the current request: if the request runs via HTTPS, the tag builds the address via the SSL domain, otherwise via the main domain.

## The path of the current template

`URL-Template` returns the directory in which the template currently being processed is located. It belongs in the `base` element in the page header so that all relative references in the template resolve.

```html theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
<head>
   <base href="~URL-Template~">
   <link rel="stylesheet" href="css/shop.css">
</head>
```

> [!NOTE]
>
> The value depends on the template currently being processed, not on a fixed directory. If templates are located in several subdirectories, the tag returns the matching one in each case. Here too, the shop system chooses between the SSL domain and the main domain depending on the request.

> [!WARNING]
>
> On the template for submitting the order, `URL-Template` has a second, invisible task: directly after it, it inserts a small JavaScript into the page that provides the `check_submit()` function. This function intercepts double clicks on the order button and shows a notice on the second click. If you omit `~URL-Template~` on this page, the function is missing, and an `onsubmit="return check_submit();"` in the form has no effect. The previous documentation does not mention this connection.

```html theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
<form action="..." method="post" onsubmit="return check_submit();">
   ...
</form>
```

> [!NOTE]
>
> The inserted script comes with its notice text in German and English and cannot be customized. If you build your own protection against double clicks, use a different function name so that the two do not get in each other's way.

## The parameters of the request

Three tags loop over the parameters with which the current page was requested. This lets you, for example, pass campaign parameters on to a follow-up link or make them visible for troubleshooting.

| Tag | Returns |
| - | - |
| `URL-Parameter` | as a single tag the number of parameters, as bracketing whether there are any, as a loop the iteration |
| `URL-Parameter_name` | the name of the parameter in the iteration |
| `URL-Parameter_value` | its value |

```html theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{URL-Parameter}
   <p>Dieser Aufruf hat ~URL-Parameter~ Parameter:</p>
   <ul>
      {@URL-Parameter}
         <li>~URL-Parameter_name~</li>
      {/@URL-Parameter}
   </ul>
{/URL-Parameter}
```

> [!NOTE]
>
> These three tags are available in the shop system but are not described in the previous documentation.

> [!WARNING]
>
> `URL-Parameter_value` and `URL-Parameter_name` output the value **unchanged**, that is without the HTML encoding that almost all other tags apply. The values come from the request and therefore from outside. Never write them unchecked into an attribute, a script or visible text. To pass a parameter on to a link, build it yourself deliberately instead of passing the value through.

> [!NOTE]
>
> Parameters that the shop system itself uses for internal assignment are excluded. They appear neither in the count nor in the loop. What remains are the parameters that were appended to the request from outside.

> [!NOTE]
>
> `URL-Parameter_name` and `URL-Parameter_value` are invalid tags outside the loop. Within the loop, both also work as bracketing, namely when a value is present. For a parameter without a value, `URL-Parameter_value` remains empty, whereas the name is always filled.

## The tags at a glance

| Tag | Single tag | Range tag | Negative range tag | Loop tag |
| - | - | - | - | - |
| `URL-Homepage` | yes | – | – | – |
| `URL-SSLDomain` | yes | yes | yes | – |
| `URL-Shop` | yes | – | – | – |
| `URL-Template` | yes | – | – | – |
| `URL-Parameter` | yes | yes | yes | yes |
| `URL-Parameter_name` | yes | yes | yes | – |
| `URL-Parameter_value` | yes | yes | yes | – |

All tags are permitted on all templates. `URL-Parameter_name` and `URL-Parameter_value` are used exclusively within the `URL-Parameter` loop.

## Related topics

* Reference: The `Domain-!` parameter in the `Basic` section of the shop configuration
* Reference: WS- (General tags)
* Guide: Links in the template


## Related topics

- [urls - URLs (web addresses)](https://dokumentation.websale.de/en/konfiguration/urls-url-webadressen.md)
- [Data migration](https://dokumentation.websale.de/en/migration/daten-migration.md)
- [Configuration deep links](https://dokumentation.websale.de/en/admin-interface/konfigurations-deeplinks.md)
- [A- (Billing address)](https://dokumentation.websale.de/en/v8s/referenz/tags/a-rechnungsadresse.md)
- [Storefront API URL Resolution](https://dokumentation.websale.de/en/schnittstellen/storefront-api/storefront-api-url-resolution.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.