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

# arc:else

> Executes an alternate block of code when its parent conditional keyword (such as arc:exists or arc:match) does not satisfy its condition.

export const siteNameShort = "Arc";

Use the `arc:else` keyword to execute an alternate block of code when a test like [arc:exists](./op-arc-exists) or [arc:match](./op-arc-match) fails. You can also use it to execute an alternate block of code in an [arc:call](./op-arc-call) when the call fails to produce any output items.

Unlike other languages, {siteNameShort}Script requires the `arc:else` statement to be within the scope of the test it belongs to.

## Parameters

None

## Control Attributes

None

## Example

Return a placeholder title if the file does not have a name:

```xml theme={null}
<arc:call op="fileListDir" out="out">
  <arc:null attr="filename">
    <arc:set attr="title" value="Unnamed File"/>
    <arc:else>
      <arc:set attr="title" value="[filename]"/>
    </arc:else>
  </arc:null>
  <arc:push title="[title]">
  [out.*]
  </arc:push>
</arc:call> 
```

## See Also

* [arc:exists](./op-arc-exists): Check if an attribute exists.
* [arc:equals](./op-arc-equals): Check for equality.
