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

# Glossary- (Glossary)

> Output the glossary in the template: the description window for a term and the alphabetical glossary index with links to the individual entries.

The glossary explains technical terms that appear in product descriptions. WEBSALE V8s automatically searches the product descriptions for the stored terms and links them. A click opens a window with the explanation.

For the template, this means two pages that you build. The description template shows a single term together with its explanation, called via a glossary link. The index template shows the alphabet and the terms for the selected letter. Both pages work with the same tags, but in different roles.

The terms themselves are not maintained in the template but entered in the online service area and generated there as well.

Guide: Embedding the glossary · Reference: WS-Config

## The description template

This page shows exactly one term. Which one is determined by the glossary link that the visitor clicked.

| Tag | Returns |
| - | - |
| `Glossary-Data` | the lookup of the requested term and the check whether it was found |
| `Glossary-Name` | the term |
| `Glossary-Descr` | the explanation |

```html theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{Glossary-Data}
   <h1>~Glossary-Name~</h1>
   <div class="erklaerung">~Glossary-Descr~</div>
{/Glossary-Data}

{!Glossary-Data}
   <p>Zu diesem Begriff liegt keine Erklärung vor.</p>
{/!Glossary-Data}
```

> [!WARNING]
>
> `{Glossary-Data}` does not just check; it fetches the data. Only with this area tag does the shop system read the requested term ID from the address and look up the term and explanation. `Glossary-Name` and `Glossary-Descr` remain empty outside this area tag.

> [!NOTE]
>
> The area only applies if both the term and the explanation were found and neither is empty. An entry with an empty explanation is therefore considered non-existent. The negative area is therefore not a luxury but catches a real case.

## The index template

This page shows the alphabet and, below it, the terms for the selected letter.

| Tag | Returns |
| - | - |
| `Glossary-Index` | the finished table with the alphabet |
| `Glossary-Data` | as a loop, the terms for the selected letter |
| `Glossary-Name` | within the loop, the term of the current iteration |
| `Glossary-DescrLink` | the link to the description window of this term |
| `Glossary-ListLink` | the same link, additionally with the selected letter |

```html theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{CAT-AdvData($Glossary,99)}
   ~Glossary-Index~

   <ul class="glossarliste">
      {@Glossary-Data}
         <li><a href="~Glossary-DescrLink~">~Glossary-Name~</a></li>
      {/@Glossary-Data}
   </ul>
{/CAT-AdvData($Glossary,99)}
```

> [!NOTE]
>
> `Glossary-Index` generates the alphabet table completely by itself, including the links to the individual letters. Which letters and letter combinations appear there is defined in the online service area. You design the result using the styles `glossary_index_table`, `glossary_index`, `glossary_index_selected` and `glossary_index_invalid`.

> [!NOTE]
>
> `Glossary-Index` also works as an area tag and applies if any letters are stored at all. This lets you hide the surroundings of the table as long as the glossary is still empty.

### Which link for what

`Glossary-DescrLink` and `Glossary-ListLink` both lead to the description of the current term. The difference lies in what they carry along.

| Tag | Carries along |
| - | - |
| `Glossary-DescrLink` | only the term ID |
| `Glossary-ListLink` | the term ID and the currently selected letter |

> [!NOTE]
>
> `Glossary-ListLink` is the appropriate link if the visitor should return to the same letter after reading. `Glossary-DescrLink` is sufficient for a window that opens over the page and leaves the list untouched.

> [!NOTE]
>
> Neither tag has a reference page in the previous documentation. `Glossary-DescrLink` only appears in the guide's example, `Glossary-ListLink` nowhere.

## What appears in the index

Not every term appears in the index. The loop only returns terms that meet three conditions.

* The term is released for the index. Several spellings can be stored for one explanation, for example singular and plural, and you determine which of them goes into the index.
* The term belongs to the language of the requested shop.
* The term begins with one of the characters assigned to the selected letter.

> [!NOTE]
>
> Assigning several characters to one letter is the reason why, in a German-language shop, terms with "Ä" also appear under "A". Other rules can be stored for other languages.

## Automatic linking

In the product descriptions, the shop system sets the glossary links itself. Two limits apply that are not visible in the template but explain why a term sometimes remains unlinked.

> [!WARNING]
>
> Within each product description, each term is linked only once, namely at its first occurrence. Further mentions of the same term remain text. In total, the shop system sets at most 100 glossary links per description. In long descriptions with many technical terms, the rest remain unlinked.

> [!NOTE]
>
> The search in the product descriptions is case-sensitive. A term that appears in running text both capitalised and in lower case must be stored in both spellings. The same applies to singular and plural.

## The tags at a glance

| Tag | Single tag | Area tag | Negative area tag | Loop tag |
| - | - | - | - | - |
| `Glossary-Data` | – | yes | yes | yes |
| `Glossary-Name` | yes | yes | yes | – |
| `Glossary-Descr` | yes | yes | yes | – |
| `Glossary-Index` | yes | yes | yes | – |
| `Glossary-DescrLink` | yes | – | – | – |
| `Glossary-ListLink` | yes | – | – | – |

`Glossary-Descr` only applies in the description template. `Glossary-Index`, `Glossary-DescrLink` and `Glossary-ListLink` only apply in the index template, the two link tags only within the `@Glossary-Data` loop. `Glossary-Name` applies on both templates.

> [!WARNING]
>
> The tag `PhraseID` described in the previous documentation does not exist. The shop system's tag table contains no entry of this name, neither for the glossary nor for any other prefix. The term ID is inserted into the links exclusively via `Glossary-DescrLink` and `Glossary-ListLink` and is not available individually in the template.

## Related topics

* Guide: Embedding the glossary
* Reference: WS-Config
* Reference: WS-Link()


## Related topics

- [Styles for modules and interfaces](https://dokumentation.websale.de/en/v8s/referenz/styles/module-und-schnittstellen.md)
- [Special online services](https://dokumentation.websale.de/en/v8s/online-servicebereich/spezielle-online-dienste.md)
- [Navigation and category tree](https://dokumentation.websale.de/en/v8s/referenz/tags/cat/navigation-und-kategoriebaum.md)
- [Glossary: Technical terms of the WEBSALE documentation](https://dokumentation.websale.de/en/glossar.md)
- [Basics and technology](https://dokumentation.websale.de/en/v8s/referenz/konfigurationen/shopkonfiguration-shop-config/grundlagen-und-technik.md)


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