Skip to content
This repository has been archived by the owner on Jan 8, 2025. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant