Closed smontanaro closed 2 years ago
Hi, for future questions, welcome to post them to the discussions page.
You can just pass your keyword arguments to render_nav_item
, Jinja will collect them and pass them to the underly url_for
call (you can access the kwargs
dict inside a Jinja macro directly), check out the docs for more details.
I'm planning to remove the badge
and use_li
parameters or rename them to _badge
/_use_li
, so they won't shadow user's keyword arguments.
The bad link was fixed in https://github.com/greyli/bootstrap-flask/commit/43585644585a05d9e72f067851063aae66b6ac94, thanks!
If there is a better place to ask for help with bootstrap-flask, let me know. I saw nothing in the docs. BTW, the "this tutorial" link on the PyPI page returns 404:
https://bootstrap-flask.readthedocs.io/en/latest/migrate.html
.I'm trying to use bootstrap-flask 2.0.1 (and Bootstrap) for the first time. I'm failing miserably. I have this nav bar Jinja2 code:
I don't see how to pass the kwargs in that the underlying call to
url_for
requires. I'm pretty new to Jinja, so I'm quite possibly missing something, but doesn't the macro definition require a**kwargs
formal argument?Am I misunderstanding how to pass arguments to
render_nav_item()
?