Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a context variable with current path #123

Open
nils-van-zuijlen opened this issue Jun 21, 2020 · 0 comments
Open

Add a context variable with current path #123

nils-van-zuijlen opened this issue Jun 21, 2020 · 0 comments

Comments

@nils-van-zuijlen
Copy link

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.

@nils-van-zuijlen 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 free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant