What does resolve_variable do? And could I use it for accessing the request outside of the view?
Edit
So template.Variable is the correct way to go – but I’m still unsure of its purpose. The documentation doesn’t really help.
Cheers guys.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I’m assuming your trying to write a custom template tag here, so here’s what you do.
In your compilation function, you bind the variable like so:
If you only want access the request, you bind against the variable directly in the node. Make sure you have the request in the context:
Then in your template tag code.