> ## 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.

# PR- (Images and links)

> Output product images in four sizes, link to a product, pass values URL-encoded and use the product's SEO fields in the template.

Every product comes with two things that are needed on almost every page: an image and a link. The `PR-` tags on this page provide both. In addition, there are the URL-encoded versions of individual product values, which you need when you append a value to a link yourself, and the product's SEO fields.

All tags on this page work with the active product. On the product detail view, this is the displayed product; in a list, it is the product of the current loop iteration.

Reference: PR- (Basics and product data)

## The four image sizes

A product can have four images. Each size has its own product data field, its own directory and its own tag.

| Tag | Product data field | Directory under `benutzer/produkte/medien/bilder/` |
| - | - | - |
| `PR-MiniThumbnail` | `MiniThumbnail=` | `mini` |
| `PR-Thumbnail` | `Thumbnail=` | `klein` |
| `PR-Image` | `Image=` | `normal` |
| `PR-LargeImage` | `LargeImage=` | `gross` |

Instead of the fixed product data field, you can also use a free product data field of the type media. The type of the free field determines which size results.

```html theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{PR-Thumbnail}
   <a href="~PR-Link~">
      <img src="~PR-Thumbnail~" alt="~PR-Name_StripHtml~">
   </a>
{/PR-Thumbnail}

{!PR-Thumbnail}
   <img src="/bilder/kein-bild.svg" alt="">
{/!PR-Thumbnail}
```

> [!NOTE]
>
> As single tags, all four tags output a complete path that you place unchanged in the `src` attribute. As range tags, they apply if the corresponding product data field is filled. Always use the range, because otherwise an empty field results in an `img` element without a source.

> [!NOTE]
>
> For the `alt` attribute, `PR-Name_StripHtml` is better suited than `PR-Name`, because the product name can contain markup, and markup has no place in the `alt` attribute.

> [!NOTE]
>
> The shop system can prepare the image address for search engines and build the product name and the product data field `RobotImageKeywords` into the path. This can be configured separately for each image size. The tags themselves do not change as a result; only the output address looks different.

## The link to a product

`PR-Link()` creates the link to a product. Without an argument, this is always the product in whose context the tag is placed.

```html theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{@PR-Data}
   <a href="~PR-Link~">~PR-Name~</a>
{/@PR-Data}
```

With an argument, you link to a specific other product. As the argument, you specify a product index, either fixed or from a free product data field.

```html theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
<a href="~PR-Link(1234)~">Zum Zubehör</a>

<a href="~PR-Link($PR-LinkToThisProdIndex$)~">Zum Zubehör</a>
```

> [!WARNING]
>
> If you pass a tag as an argument, replace its tilde characters with dollar signs. `~PR-Link(~PR-Feld~)~` does not work, `~PR-Link($PR-Feld$)~` does.

> [!NOTE]
>
> Without an argument and with a free product data field as the argument, the tag needs an active product and therefore belongs in a product template or a product loop. With a fixed product index, it is available in all templates.

> [!NOTE]
>
> `PR-Link` is exclusively a single tag. As a range tag, it outputs nothing.

In addition to the product index, the generated link also contains the index of the category from which the link is made. As a result, the same product gets different addresses depending on the path. If the link should be independent of the category, use `PR-LinkWithoutCI()`. It works exactly like `PR-Link()` but omits the category index.

> [!NOTE]
>
> `PR-LinkWithoutCI` and `PR-LinkWithoutCI()` are available in the shop system but are not described in the previous documentation. They are suitable wherever an address must be unique, for example in exports, in emails or as the target of a redirect.

## Further links to the product

| Tag | Leads to |
| - | - |
| `PR-SetLink` | the current set combination of the product |
| `PR-SetLinkEnc` | the same address, URL-encoded for passing as a parameter |
| `PR-ActionImagesUploadLink` | the form through which buyers upload their own product image |
| `PR-ActionImagesShowLink` | the overview of the uploaded images for this product |

```html theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{PR-Data}
   <a href="~PR-SetLink~">Diese Zusammenstellung teilen</a>
{/PR-Data}
```

> [!NOTE]
>
> `PR-SetLink` belongs in the `PR-Data` area of the product detail view, because only there is the selected set combination determined.

> [!NOTE]
>
> `PR-ActionImagesShowLink` is available in the shop system but is not described in the previous documentation. It is the counterpart to `PR-ActionImagesUploadLink` and leads to the display instead of the upload.

> [!NOTE]
>
> All four tags are exclusively single tags. As range tags, they are treated as an invalid tag.

Guide: ProductsInAction

## URL-encoded values

If you append a product value to an address yourself, it must be URL-encoded. There are ready-made tags for the four values where this regularly occurs.

| Tag | Encoded version of |
| - | - |
| `PR-ProdIndexEnc` | `PR-ProdIndex` |
| `PR-VarIndexEnc` | `PR-VarIndex` |
| `PR-NumberEnc` | `PR-Number` |
| `PR-OrderInfoEnc` | `PR-OrderInfo` |

```html theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{PR-Number}
   <a href="/service?artikel=~PR-NumberEnc~">Frage zu diesem Artikel</a>
{/PR-Number}
```

> [!NOTE]
>
> `PR-OrderInfoEnc` is available in the shop system but is not described in the previous documentation.

> [!WARNING]
>
> The previous documentation lists `PR-NumberEnc` only as a single tag. In the shop system, it shares the branch with `PR-Number` and therefore also applies as a range tag and as a negative range tag, based on the same value. For the range, it makes no difference which of the two tags you use.

> [!NOTE]
>
> In the product menu type Order from catalog, `PR-Number` and `PR-NumberEnc` do not return the product number from the product data but the number entered by the buyer for the current row. This is intentional but is surprising if you take over the template from a product list.

## The product's SEO fields

In addition to the product name, the shop system maintains its own SEO product name and twenty free SEO fields.

| Tag | Returns |
| - | - |
| `PR-SeoName` | the SEO product name |
| `PR-SeoFreeField1` … `PR-SeoFreeField20` | the content of SEO product fields 1 to 20 |

```html theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{PR-SeoName}
   <h1>~PR-SeoName~</h1>
{/PR-SeoName}

{!PR-SeoName}
   <h1>~PR-Name~</h1>
{/!PR-SeoName}
```

> [!WARNING]
>
> Every evaluation of one of these tags reads the SEO fields from the database. Get the value once in a range and continue working within it, instead of repeating the same tag in several places on the page.

> [!NOTE]
>
> The SEO fields return the same content as the `E-PSEO_Field1…20` tags. The difference is the perspective: the `E-PSEO_` tags belong to the page, the `PR-SeoFreeField` tags belong to the product and therefore also work per entry in a list.

> [!NOTE]
>
> The previous documentation names only the product detail view for both. In the shop system, they depend on the active product and are therefore available wherever product data is present.

Reference: E-PSEO\_Field1…20

## PR-DeepLink does not belong in a shop template

`PR-DeepLink` is not a tag of the shop system. It belongs to the product data export and is replaced there when the export file is generated. The same family includes:

| Tag | Returns |
| - | - |
| `PR-DeepLink` | the complete address of the product |
| `PR-DeepLinkPath` | the same address without domain and without parameters |
| `PR-CanonicalDeepLink` | the canonical address of the product |
| `PR-IsCanonicalDeepLink` | a range that applies if both addresses match |

For `PR-DeepLink`, `PR-DeepLinkPath` and `PR-CanonicalDeepLink`, there is a version with the prefix `ENCXML-` that outputs the value masked for XML.

> [!WARNING]
>
> The previous documentation lists `PR-DeepLink` among the `PR-` tags and names the BackInStock email as the permitted template. `PR-DeepLink` does not appear in the tag table of the shop system. For a product link in an email, use `PR-Link` or `PR-LinkWithoutCI`.

Guide: Product data export

## Deprecated tags

Image and link tags with an additional list abbreviation in the name date from earlier versions, for example `PR-CL-MiniThumbnail`, `PR-CSL-MiniThumbnail`, `PR-SL-MiniThumbnail` and `PR-SL-Link`. They were intended for the cross-link list and the replacement product list.

> [!WARNING]
>
> These tags still exist by name in the shop system, but return an invalid tag in every type of use. Instead, use the normal image and link tags within the respective loop.

## Present in the shop system, not previously described

In addition to the tags mentioned above, there are two further SEO tags for which no description is available yet.

| Tag | Presumed purpose |
| - | - |
| `PR-SEOPath` | the SEO path of the product |
| `PR-SEOCanonicalPath` | the canonical SEO path of the product |

> [!NOTE]
>
> Both are created as product data fields in the shop system. What exactly they output and in which templates they apply has yet to be clarified.

## The tags at a glance

| Tag | Single tag | Range tag | Negative range tag | Loop tag |
| - | - | - | - | - |
| `PR-MiniThumbnail` | yes | yes | yes | – |
| `PR-Thumbnail` | yes | yes | yes | – |
| `PR-Image` | yes | yes | yes | – |
| `PR-LargeImage` | yes | yes | yes | – |
| `PR-Link()` | yes | – | – | – |
| `PR-LinkWithoutCI()` | yes | – | – | – |
| `PR-SetLink` | yes | – | – | – |
| `PR-SetLinkEnc` | yes | – | – | – |
| `PR-ActionImagesUploadLink` | yes | – | – | – |
| `PR-ActionImagesShowLink` | yes | – | – | – |
| `PR-ProdIndexEnc` | yes | – | – | – |
| `PR-VarIndexEnc` | yes | – | – | – |
| `PR-NumberEnc` | yes | yes | yes | – |
| `PR-OrderInfoEnc` | yes | – | – | – |
| `PR-SeoName` | yes | yes | yes | – |
| `PR-SeoFreeField1` … `PR-SeoFreeField20` | yes | yes | yes | – |

The image tags, the encoded values and the SEO tags are available wherever product data is present, that is, on the product detail view and within `PR-Data`, `@PR-Data` and `PR-AdvData()`. `PR-SetLink` and `PR-SetLinkEnc` belong on the product detail view. `PR-Link()` and `PR-LinkWithoutCI()` need an active product, unless you specify a fixed product index as the argument.

## Related topics

* Reference: PR- (Basics and product data)
* Reference: PR- (Variant overview)
* Reference: PIA- (ProductsInAction)
* Guide: Search engine optimization
* Guide: Product data export


## Related topics

- [PR- (Basics and product data)](https://dokumentation.websale.de/en/v8s/referenz/tags/pr/grundlagen-und-produktdaten.md)
- [Adapting templates for Strapi content](https://dokumentation.websale.de/en/strapi-cms/templates-fur-strapi-inhalte-anpassen.md)
- [Clothing module](https://dokumentation.websale.de/en/v8s/kategorien/bekleidungsmodul.md)
- [Web-to-print in the basket](https://dokumentation.websale.de/en/v8s/referenz/tags/basket/web-to-print-im-warenkorb.md)
- [Internal links](https://dokumentation.websale.de/en/v8s/domains/interne-verlinkungen.md)


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