mirror of
https://github.com/django-components/django-components.git
synced 2025-08-17 12:40:15 +00:00
Update README.md (#766)
Updated documentation for dynamic components. Close #764 .
This commit is contained in:
parent
6dd8fce83c
commit
9f891453d5
1 changed files with 14 additions and 0 deletions
14
README.md
14
README.md
|
@ -1085,6 +1085,20 @@ Instead, you can use **dynamic components**. Dynamic components are used in plac
|
|||
{% endcomponent %}
|
||||
```
|
||||
|
||||
or in case you use the `django_components.component_shorthand_formatter` tag formatter:
|
||||
|
||||
```django
|
||||
{% dynamic is=component_name title="Cat Museu" %}
|
||||
{% fill "content" %}
|
||||
HELLO_FROM_SLOT_1
|
||||
{% endfill %}
|
||||
{% fill "sidebar" %}
|
||||
HELLO_FROM_SLOT_2
|
||||
{% endfill %}
|
||||
{% enddynamic %}
|
||||
```
|
||||
|
||||
|
||||
These behave same way as regular components. You pass it the same args, kwargs, and slots as you would
|
||||
to the component that you want to render.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue