How do I pass urls into a component (django-components)?

I want to create a component for a dropdown menu and therefore I want to inject several names and urls as items.

part of the component:

  <ul class="dropdown-menu dropdown-menu-lg-end" aria-labelledby="dropdownMenuButton1">
        {% for item in items %}
        <li><a class="dropdown-item" href={{ item.url }}>{{ item.name }}</a></li>
        {% endfor %}
    </ul>
{% component_block "bs_dropdown" items=??? %}
{% endcomponent_block %}

Any ideas?

Thanks

I tried injecting a single hard coded url and that worked. But of course that's not how it sould be. It would be possible to slot the items, but then one would have to know to use the class "dropdown-item" and that's also not how it should be. As a programmer I just want to pass names and urls.

Back to Top