{#-
Error Fallback Template

This template is used when the main template fails to render.
It provides a minimal but functional documentation page.
-#}

---
title: "{{ element.name if element and element.name else 'Documentation Error' }}"
type: "error-fallback"
description: "Template rendering failed - showing fallback content"
---

# {{ element.name if element and element.name else 'Documentation Error' }}

:::{error}
Template Rendering Failed
{% if error_info %}
Error: {{ error_info.error_message }}
Template: {{ error_info.template_name }}
{% endif %}
:::

## Basic Information

{% if element %}
**Name:** {{ element.name if element.name else 'Unknown' }}
**Type:** {{ element.element_type | default('Unknown') }}
{% if element.source_file %}
**Source:** {{ element.source_file | project_relative }}
{% endif %}
{% if element.line_number %}
**Line:** {{ element.line_number }}
{% endif %}

{% if element.description %}
## Description

{{ element.description }}
{% endif %}

{% if element.children and element.children | length > 0 %}
## Contents

This {{ element.element_type | default('element') }} contains:

{% for child in element.children[:10] %}
- {{ child.name }} ({{ child.element_type | default('unknown') }})
{% endfor %}
{% if element.children | length > 10 %}
- ... and {{ element.children | length - 10 }} more items
{% endif %}
{% endif %}

{% else %}
**Error:** No element information available.
{% endif %}

---

*This is fallback content generated when the main template failed to render. Please report this issue if it persists.*
