-
Notifications
You must be signed in to change notification settings - Fork 57
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
Relative URL in template #34
Comments
@yageek : There's many avenues you can take to construct the URL, but the main keywords that stuck out at me were "without having to repeat", which is a good indicator to use a method of some kind. Within that method you can pass in the URL, then do some logic on it to figure out when to append "/admin". I am unaware of your template usage, but if you're dealing with nested objects, then you may consider using a function map, which returns your constructed URL dynamically in the template. |
What do you mean by using nested object ? I think that using a I use the template basic system. I wanted to use the |
I apologize if I caused any confusion, but all I meant by a nested object is if you had objects/fields within an object that you needed to check against. Handler:
Template:
How about something like this? |
I use render to generate some basic HTML and I don't manage to create a relative URL to the current route without hardcoding all the URL.
For example I create a group "admin" and in the template I would like to create link without having to repeat "/admin" in the templates.
The text was updated successfully, but these errors were encountered: