You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 8, 2025. It is now read-only.
I'm trying to create a nav with an element that signifies which is the current page, but I can't work it out.
It would be easier if there was a way to easily know which page is rendered from the Jinja context.
It may be implemented by adding a current_path context variable, derived from the base_path and the view's path.
Also, another requirement for it would be that it corresponds to the output of the url templatetag for that view.
The text was updated successfully, but these errors were encountered:
nils-van-zuijlen
changed the title
Add a context variable with current URL
Add a context variable with current path
Jun 21, 2020
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I'm trying to create a nav with an element that signifies which is the current page, but I can't work it out.
It would be easier if there was a way to easily know which page is rendered from the Jinja context.
It may be implemented by adding a
current_path
context variable, derived from thebase_path
and the view'spath
.Also, another requirement for it would be that it corresponds to the output of the
url
templatetag for that view.The text was updated successfully, but these errors were encountered: