Classes
KidaAdapter
5
▼
TemplateAdapter implementation using Kida's public block/layout APIs.
KidaAdapter
5
▼
TemplateAdapter implementation using Kida's public block/layout APIs.
Methods
render_template
2
str
▼
Render a full template to HTML.
render_template
2
str
▼
def render_template(self, template: str, context: dict[str, Any]) -> str
Parameters
| Name | Type | Description |
|---|---|---|
template |
— |
|
context |
— |
Returns
str
render_block
3
str
▼
Render a named block from a template.
render_block
3
str
▼
def render_block(self, template: str, block: str, context: dict[str, Any]) -> str
Parameters
| Name | Type | Description |
|---|---|---|
template |
— |
|
block |
— |
|
context |
— |
Returns
str
compose_layout
3
str
▼
Render template with pre-rendered HTML injected into blocks.
compose_layout
3
str
▼
def compose_layout(self, template: str, block_overrides: dict[str, str], context: dict[str, Any]) -> str
Parameters
| Name | Type | Description |
|---|---|---|
template |
— |
|
block_overrides |
— |
|
context |
— |
Returns
str
template_metadata
1
object | None
▼
Return TemplateMetadata for block validation and composition planning.
template_metadata
1
object | None
▼
def template_metadata(self, template: str) -> object | None
Parameters
| Name | Type | Description |
|---|---|---|
template |
— |
Returns
object | None
Internal Methods 1 ▼
__init__
1
▼
__init__
1
▼
def __init__(self, env: Environment) -> None
Parameters
| Name | Type | Description |
|---|---|---|
env |
— |