Opened 15 years ago

Closed 15 years ago

#10823 closed (duplicate)

Implement using variable values within template tags

Reported by: anonymous Owned by: nobody
Component: Template system Version: 1.0
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Currently writing template code like this:

<a href="{% url {{currentPageName}} nextPageOffset %}">Next page</a>

results in syntax error.

Technically I see no obstacle to disallow evaluating such expressions, please implement it.

Change History (2)

comment:1 by anonymous, 15 years ago

After thinking it over, the problem is actually with the URL tag.
It interprets unquoted text as value not variable reference, unlike other tags.

The proposed syntax is just a workaround for problem within the URL tag.

comment:2 by Alex Gaynor, 15 years ago

Resolution: duplicate
Status: newclosed

There was another ticket asking for variables for the viewname in the {% url %}, it was wontfixed.

Note: See TracTickets for help on using tickets.
Back to Top