Sending in prepared data for link generation
Notice: This thread is very old.
- tomolas
- Member | 66
Hello,
imagine you have a route in format: users/1234-john-doe
Router would look something like this:
When creating a link, UrlResolver
goes and looks inside the
database (e.g. to find users name by user id).
In the moment of link creation, I actually often have users name already available in a variable inside a template. My goal is to skip the database query and construct the link with data already provided.
It could look something like this:
..the problem is, that $name
is not accessible/passed inside the
UrlResolver
method calls.
How do I accomplish this?
Maybe I'm missing something obvious.
Thank you for your help.
Last edited by tomolas (2017-03-02 23:16)