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

# msm:if

> Bedingtes Rendern

`<msm:if>` rendert den inneren Inhalt nur, wenn die Bedingung `true` ist.

## Grundstruktur

```html theme={null}
<msm:if id="loggedIn" bean="userServiceImpl" scope="SESSION" test="isLoggedIn">
  <msm:template>
    <div>Welcome back!</div>
  </msm:template>
</msm:if>
```

## Attribute

| Attribut | Erforderlich | Bedeutung                                                        |
| -------- | -----------: | ---------------------------------------------------------------- |
| `id`     |           ja | Eindeutige Condition-ID.                                         |
| `test`   |           ja | Boolean-Ausdruck oder Bean-Method-Definition.                    |
| `bean`   |         nein | Bean-ID (optional, wenn `test` auf einem Bean ausgewertet wird). |
| `scope`  |         nein | Bean-Scope (`PROTOTYPE` oder `SESSION`).                         |
